Showing that pushout with inclusion induces closed map into pushout How do i prove this formally correct? 
For $X,Y$ Topological Spaces and $A \subset Y$ closed. Let the Following Diagram Commute:
$\require{AMScd}$
\begin{CD}
A @>{i}>> Y\\
@V{f}VV @VVV\\
X @>{g}>> X+_fY
\end{CD}
Where $i$ is the inclusion of $Y$. 
Show that g is a closed map
I feel like this should'nt be that hard to prove because $\sim_f$ only identifies elements of $X$ with elements of $Y$ so g should behave almost like an inclusion into the pushout because it is just the composition of the inclusion into $X+Y$ and the quotient Map that does'nt identify anything on X alone.
I could very well be wrong and i only have the knowledge of the first few chapters of an intro to Topology Book. Thanks in advance
 A: Formally we can define the topological sum $X + Y$ as follows. As a set we take
$$X + Y = X \times \{1\} \cup Y \times \{2\} .$$
Then each subset $M \subset X+ Y$ has the form $M = M_X \times \{1\} \cup M_Y \times \{2\}$ with unique subsets $M_X \subset X, M_Y \subset Y$ and we write $M = M_X + M_Y$. We topologize $X+Y$ by declaring $U \subset X + Y$ to be open if $U_X$ is open in $X$ and $U_Y$ is open in $Y$.
The subspaces $X' = X \times \{1\}$ and $Y' = Y \times \{1\}$ are disjoint open subspaces of $X + Y$ which are homeomorphic copies of $X$ and $Y$.
To simplify notation, we shall identify $X'$ with $X$ and $Y'$ with $Y$. That is, we regard $X,Y$ as genuine open disjoint subspaces of $X+Y$.
$X +_f Y$ is the quotient space
$$(X + Y) / \sim$$
where $\sim$ is the equivalence relation generated by $f(a) \sim i(a) = a$ for all $a \in A$. In other words, each $x  \in f(A)$ is identified with the points in $f^{-1}(x) \subset A$. Let us understand the equivalence classes.

*

*If $x \in X \setminus f(A)$, then $[x] = \{x\}$.

*If $x \in f(A)$, then $[x] = \{x\} + f^{-1}(x)$.

*if $y \in Y \setminus A$, then $[y] = \{y\}$.

*If $y \in A$, then $[y] = \{f(y)\} + f^{-1}(f(y))$ (note that $y \sim f(y)$ and apply 2.).

Note that 1. and 2. can be summarized to


*$[x] = \{x\} + f^{-1}(x)$ for each $x \in X$.

Let $p : X + Y \to X +_f Y, p(z) = [z]$, denote the quotient map.
The map $g$ is given by $g(x) = [x]$. By 5. it is injective. For each $x \in X$ we have
$$p^{-1}(g(x)) = p^{-1}([x]) = \{x\} + f^{-1}(x) .$$
For $C \subset X$ we thus get
$$p^{-1}(g(C)) = p^{-1}(\bigcup_{x \in C}\{g(x)\}) =  \bigcup_{x \in C}p^{-1}(\{g(x)\}) =  \bigcup_{x \in C} (\{x\} + f^{-1}(x))= C + f^{-1}(C) .$$
Therefore if $C \subset X$ is closed, then $p^{-1}(g(C))$ is closed in $X + Y$. Since $p$ is a quotient map, this shows that $g(C)$ is closed in $X +_f Y$.
Hence $g$ is a closed map.
