Let $X$ be a topological space and let $A \subset X$ be a subset. We define the topological space $X/A$ to be the quotient space $X/\mathcal{R}$ where $\mathcal{R}$ is the equivalence relation defined by: $$a \sim b \iff a, b \in A \text{ or } a = b.$$ We assume $A$ is closed and $f : A \to Y$ is a continuous map.
Show that $( X \sqcup_f Y)/Y $ is homeomorphic to $X/A$.
Intuitively I understand what's going on, if I start in $X$, the two "maps" result in the same space. For $( X \sqcup_f Y)/Y$ we are sending all $a \in A $ to $Y$ and then we remove all $y \in Y$ (including this $a$), and $X/A$ is simply removing all $a \in A$ from $X$.
This is for homework, so I am only looking for help on defining my homeomorphic map.
Let $p : X \to X/A$ and $q : X \sqcup Y \to X \sqcup_f Y$ denote the quotient maps. We then get another quotient map $r : X \sqcup_f Y \to (X \sqcup_f Y)/q(Y)$.
Define $h : X \sqcup Y \to X/A, h \mid_X = p, h \mid_Y = c$, where $c$ is the constant map $c(y) = [A]$ = common equivalence class of all $a \in A$. For $a \in A$ we have $h(a) = p(a) = c(f(a))$, hence $h$ sends all points which are identified under $q$ to the same point in $X/A$. Therefore we get a unique function $h' : X \sqcup_f Y \to X/A$ such that $h' \circ q = h$. By the universal property of the quotient we see that $h'$ is continuous. Obviously all points in $q(Y)$ are sent by $h'$ to $[A]$ and we get a unique continuous function $h'' : (X \sqcup_f Y)/q(Y) \to X/A$ such that $h'' \circ r = h'$.
Next define $g = r \circ q \circ i : X \to (X \sqcup_f Y)/q(Y)$, where $i : X \to X \sqcup Y$ denotes inclusion. For $a \in A$ we have $q(a) = q(f(a)) \in q(Y)$, thus $g(a) = r(q(a)) = [q(Y)]$ = common equivalence class of all $z \in q(Y)$. Hence $g$ induces a unique continuous $g'' : X/A \to (X \sqcup_f Y)/q(Y)$ such that $g'' \circ p = g$.
But now $h'' \circ g'' \circ p = h'' \circ g = h'' \circ r \circ q \circ i = h' \circ q \circ i = h \circ i = p = id_{X/A} \circ p$. This shows $h'' \circ g'' = id_{X/A}$ because $p$ is surjective.
Moreover $g'' \circ h'' \circ r \circ q = g'' \circ h' \circ q = g'' \circ h$. We have $(g'' \circ h) \mid_X = g'' \circ (h \mid_X) = g'' \circ p = g = r \circ q \circ i = (r \circ q) \mid_X$ and $(g'' \circ h) \mid_Y = g'' \circ (h \mid_Y) = g'' \circ c$. But $g'' \circ c : Y \to (X \sqcup_f Y)/q(Y)$ sends all points to $[q(Y)]$, i.e. we have $g'' \circ c = (r \circ q) \mid_Y$. We conclude $g'' \circ h'' \circ r \circ q = r \circ q = id_{X \sqcup_f Y)/q(Y)} \circ r \circ q$. This shows $g'' \circ h'' = id_{X \sqcup_f Y)/q(Y)} $ because $r \circ q$ is surjective.
Therefore $h''$ and $g''$ are homeomorphisms which are inverse to each other.