The real projective space $\mathbb{R}P^{2}$ is the adjunction space $D^{2} \cup_{f} S^{1}$. I would like to show that the 2-dimensional real projective space $\mathbb{R}P^{2}$ is homeomorphic to the adjunction space $D^{2} \cup_{f} S^{1}$ where $f : S^{1} \longrightarrow S^{1}$ is the function given by $f(z) = z^{2}$ (considering $S^{1}$ as a subspace of $\mathbb{C}$). 
I know this question has already been asked here, but no one gave a complete answer for it. This is a quite important fact for calculating the homology groups of $\mathbb{R}P^{2}$ so I would like to have a rigorous proof of it.
My attempt:
1) Considering $\mathbb{R}P^{2}$ as the quotient space $D^{2}/\sim$ obtained by identifying antipodal points on the boundary $S^{1}$ of $D^{2}$, I tried to construct first a function from the disjoint union $D^{2} \amalg S^{1}$ into $\mathbb{R}P^{2}$ by defining two continuous functions $g : D^{2} \longrightarrow \mathbb{R}P^{2}$ and $ h : S^{1} \longrightarrow \mathbb{R}P^{2}$ given by $g(z) = [ z^{2} ]$ and $h(z) = [z]$ (where the brackets [ ] denote the equivalence class of an element of $D^{2}$ in the quotient space $\mathbb{R}P^{2}$). 
2) Then, it's easy to see that the continuous function $F : D^{2}\amalg S^{1} \longrightarrow \mathbb{R}P^{2}$ given by $F(x) = g(x)$ for $x$ in the copy of $D^{2}$ in the disjoint union $D^{2}\amalg S^{1}$ and $F(x) = h(x)$ for $x$ in the copy of $S^{1}$ in the disjoint union $D^{2}\amalg S^{1}$ is constant on the fibers of the quotient map $p : D^{2}\amalg S^{1} \longrightarrow D^{2} \cup_{f} S^{1}$, so we obtain a continuous function $G : D^{2} \cup_{f} S^{1} \longrightarrow \mathbb{R}P^{2}$ such that $G \circ p = F$. 
3)Since $D^{2} \cup_{f} S^{1}$ is compact and $\mathbb{R}P^{2}$ is Hausdorff, $G$ would be the desired homeomoprhism if it was bijective, but if we take two antipodal points $x$ and $-x$ in the copy of $S^{1}$ in the disjoint union $D^{2} \amalg S^{1}$, then these two points are not equivalent in the adjunction space $D^{2} \cup_{f} S^{1}$, so that $p(x) \neq p(-x)$, but, by definition of the relation $\sim$ on $D^{2}$ used to obtain $\mathbb{R}P^{2}$, we have that $G(p(x)) = F(x) = h(x) = [x] = [-x] = h(-x) = F(-x) = G(p(-x))$, showing that $G$ is not injective.
I tried to modify my original functions $g : D^{2} \longrightarrow \mathbb{R}P^{2}$ and $ h : S^{1} \longrightarrow \mathbb{R}P^{2}$ to fix this issue without any success. Am I in the right direction or should I try something different? By the way, I can use any of the equivalent definitions of $\mathbb{R}P^{2}$ (by identifying lines through the origin in $R^{3} \setminus \{0\}$, antipodal points in $S^{2}$ or antipodal points in the boundary of $D^{2}$ as I did in my attempt).
Thank you very much in advance and any hints, ideas, or feedback would be greatly appreciated.
 A: You can do it much easier. Let $i : D^2 \to D^2 \sqcup S^1$ denote the canonical embedding and $p : D^2 \sqcup S^1 \to D^2 \cup_f S^1$ the quotient map. Since $f$ is surjective, we see that $\pi = p \circ i$ is surjective. We have $\pi(z) = \pi(z')$ iff $z = z'$ or $f(z) = f(z')$ with $z,z'  \in S^1$. The latter means that $z^2 = (z')^2$, i.e. $z = \pm z'$. This shows that $\pi$ induces a continuous bijection $\pi' : \mathbb RP^2 \to D^2 \cup_f S^1$. But $\mathbb RP^2$ is compact and $D^2 \cup_f S^1$ is Hausdorff so that we are done.
Edited:
Let us have a look at original approach in the question. It will 
be more complicated.
Let $q : D^2  \to \mathbb RP^2$ denote the quotient map. The restriction $q' : S^1 \to q(S^1) \subset \mathbb RP^2$ is a closed surjection, hence a quotient map. It identifies antipodal points of $S^1$, thus $ q(S^1)$ is a homeomorphic copy of $\mathbb RP^1$. Let us write $\mathbb RP^1 = q(S^1) \subset \mathbb RP^2$.
It is well-known that $\mathbb RP^1$ is homeomorphic to $S^1$. In fact, the map $f : S^1 \to S^1$ identifies antipodal points, thus it induces a continuous bijection $f' : \mathbb RP^1 \to S^1$. Since $\mathbb RP^1$ is compact and $S^1$ is Hausdorff, it is a homeomorphism. Let $h = (f')^{-1} : S^1 \to \mathbb RP^1$. We claim that $h(w) = [\sqrt{w}]$. Note that complex square roots have two values (which are antipodal), thus writing $\sqrt{w}$ involves a choice. For $h(w)$ this choice is irrelevant because it does not affect $[\sqrt{w}] \in \mathbb RP^1$. To verify our claim, note that $f'(h(w)) = f'([\sqrt{w}]) = f(\sqrt{w}) = (\sqrt{w})^2 = w$. Note also that there is no continuous root function $\sqrt{\phantom{x}} : S^1 \to S^1$. But this is irrelevant, $h = q' \circ \sqrt{\phantom{x}}$ is well-defined and continuous for any choice of such a root function.
Now define $F : D^2 \sqcup S^1 \to \mathbb RP^2$ by $F(z) = q(z)$ for $z$ in the first summand $D^2$ and $F(w) = h(w)$ for $w$ in the second summand $S^1$. Clearly $F$ is a surjection. The quotient map $p$ identifies $z \in S^1 \subset D^2$ with $w = f(z) = z^2 \in S^1$. Since we have $F(w) = F(z^2) = h(z^2) = [\sqrt{z^2}] = [z] = F(z)$, $F$ induces a continuos bijection  $F' : D^2 \cup_f S^1 \to \mathbb RP^2$.
