I found this problem in Bredon's Topology and Geometry.
My try:
Let $\pi: X\coprod Y\to Y\cup_{f}X$ be the quotient map and let $C$ and $D$ be two disjoint closed sets in $Y\cup_{f}X$. Then we write $\pi^{-1}(C)=C_{1}\coprod C_{2}$ and $\pi^{-1}(D)=D_{1}\coprod D_{2}$ where $C_{1}$ and $D_{1}$ are closed in $X$ and $C_{2}$ and $D_{2}$ are closed in $Y$. Then $C_{1}\cap D_{1}=\emptyset$ and $C_{2}\cap D_{2}=\emptyset$.
Now, normality of $X$ gives us disjoint open sets $U_{1}$ and $V_{1}$ separating $C_{1}$ and $D_{1}$, and normality of $X$ gives us disjoint open sets $U_{2}$ and $V_{2}$ separating $C_{2}$ and $D_{2}$. Now $\pi(U_{1}\coprod U_{2})$ and $\pi(V_{1}\coprod V_{2})$ would not be disjoint open sets in $Y\cup_{f} X$ if and only if there is a fiber $f^{-1}(y)$ of $f$ that intersects both $U_{1}$ and $V_{1}$.
Now we can't just subtract the problematic fibers from both $U_{1}$ and $V_{1}$ as there might be infinitely many and union of infinitely many closed sets need not be closed. This is where I am stuck. Please help.
Munkres' Topology (2nd Edition) contains this question with a hint in Exercises $\S35.8$:
Notice that $Y$ is embedded as a closed subset of $Y\cup_f X$, i.e., $\pi|_Y\colon Y\to \pi(Y)$ is a homeomorphism where $\pi\colon X\amalg Y\to Y\cup_f X$ is the quotient map. ($\because$ $\pi|_Y$ is continuous, one-to-one, and closed, since $A$ is closed.) Therefore we will identify $Y$ with the closed subset $\pi(Y)$ in $Y\cup_f X$. Then we can write $y=\pi(y)$ for all $y\in Y$, and $f(x)=\pi(x)$ for all $x\in A$.