How to show that $Y\cup_{f} X$ is normal when $X$ and $Y$ are normal and $f:A\to Y$ is a continuous map with $A$ closed in $X$? 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.
 A: Munkres' Topology (2nd Edition) contains this question with a hint in Exercises $\S35.8$:

Let $X$ and $Y$ are disjoint normal spaces, $A$ is closed in $X$, and $f\colon A\to Y$ is a continuous map. Using the Tietze theorem, show that $Y\cup_f X$ is normal.

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$.

Proof. Let $C$ and $D$ be two disjoint closed subsets in $Y\cup_f X$. We claim that there exists a continuous function $\tilde g\colon Y\cup_f X\to[0,1]\subset\mathbb{R}$ such that $\tilde g(C)=\{0\}$ and $\tilde g(D)=\{1\}$. Then $\tilde g^{-1}([0,1/3))$ and $\tilde g^{-1}((2/3,1])$ are two disjoint open sets in $Y\cup_f X$ containing $C$ and $D$, resepectively.
To construct such a map $\tilde g\colon Y\cup_f X\to[0,1]$, it suffices to define two continuous functions $\tilde g_1\colon Y\to[0,1]$ and $\tilde g_2\colon X\to[0,1]$ satisfying $\tilde g_1(\pi(x))=\tilde g_2(x)$ for all $x\in A$. ($\because$ Well-definedness of $\tilde g$ follows from the condition $\tilde g_1(\pi(x))=\tilde g_2(x)$ for all $x\in A$. Continuity of $\tilde g$ follows from the definition of the quotient map $\pi$: For any open set $U\subset [0,1]$, $\tilde g^{-1}(U)$ is open $Y\cup_f X$ if and only if $\pi^{-1}(\tilde g^{-1}(U))=\tilde g_1^{-1}(U)\cup\tilde g_2^{-1}(U)$ is open in $X\amalg Y$.)
Moreover, to satisfy $\tilde g(C)=\{0\}$ and $\tilde g(D)=\{0\}$, we must have
  $$
\tilde g_1(y) = \begin{cases} 0 & \text{if $y\in C$} \\ 1 & \text{if $y\in D$} \end{cases} \quad\text{and}\quad
\tilde g_2(x) = \begin{cases} 0 & \text{if $\pi(x)\in C$} \\ 1 & \text{if $\pi(x)\in D$} \end{cases}
\tag{*}
$$
(1) Since $Y$ is normal, Urysohn's lemma implies that there exists a continuous function $\tilde g_1\colon Y\to[0,1]$ such that $\tilde g_1(C\cap Y)=\{0\}$ and $g_1(D\cap Y)=\{1\}$.
(2) Define $g_2\colon A\cup\pi|_X^{-1}(C)\cup\pi|_X^{-1}(D)\to[0,1]$ by
  $$
g_2(x) = \begin{cases} \tilde g_1(f(x))=\tilde g_1(\pi(x)) & \text{if $x\in A$} \\ 0 & \text{if $x\in\pi|_X^{-1}(C)$} \\ 1 & \text{if $x\in\pi|_X^{-1}(D)$} \end{cases}
$$
  It is trivial to check that $g_2$ is well-defined and continuous. Since $A\cup\pi|_X^{-1}(C)\cup\pi|_X^{-1}(D)$ is closed in the normal space $X$, Tietze theorem implies that $g_2$ extends to a continuous function $\tilde g_2\colon X\to [0,1]$ such that $\tilde g_2=g_2$ on $A\cup\pi|_X^{-1}(C)\cup\pi|_X^{-1}(D)$.
(3) For any $x\in A$, we have $\tilde g_2(x)=g_2(x)=\tilde g_1(f(x))=\tilde g_1(\pi(x))$. So we know that there is a continuous function $\tilde g\colon Y\cup_f X\to [0,1]$. Moreover, (*) follows from the definitions of $\tilde g_1$ and $\tilde g_2$.

