"Only if" part:
We assume ##f## is monomorphic.
(i) Let ##p_1 : X \times_Y X \rightarrow X## and ##p_2 : X \times_Y X \rightarrow X## be the canonical projection morphisms. See figure A. We have ##f \circ p_1 = f \circ p_2##. As ##f## is monomorphic we have ##p_1 = p_2 = p##. Thus there is a unique ##p## such that ##p \circ \Delta_f = \text{id}_X##.
Figure A
(ii) See figure B. By definition of a fibered product, ##\Delta_f \circ p## is uniquely determined. By (i) we have ##p \circ \Delta_f \circ p = p##, meaning that by the uniqueness of ##\Delta_f \circ p##, we have ##\Delta_f \circ p = \text{id}_{X \times_Y X}##.
Figure B
"If" part:
We assume that ##\Delta_f## is an isomorphism.
We wish to prove that if ##f \circ \alpha = f \circ \beta## (i.e. figure C) then ##\alpha = \beta##, when ##\Delta_f## is an isomorphism.
Figure C
First note: that as ##\Delta_f## is an isomorphism it has a unique inverse morphism, and as such ##p_1 = p_2 = p##.
See figure D. By definition of a fibered product, there is a unique morphism ##\xi : W \rightarrow X \times_Y X## such that ##\alpha = p_1 \circ \xi## and ##\beta = p_2 \circ \xi##. As ##p_1 = p_2 = p##, we have ##\alpha = p \circ \xi = \beta##.
Figure D