I have a continuous map $r:X \to A$, for $A \subset X$ such that $r(a)=a$ for all $a \in A$. If $a_0 \in A$ I want to prove that the map $$r_{*,a_0}:\pi_1(X,a_0) \to \pi_1(A,a_0)$$ is onto.
Now I know that this map takes a loop $\gamma$ to $r \circ \gamma$. What I tried to do is set $y=r \circ \gamma$ and if $h$ was invertible, then $r_{*,a_0}$ would send $r^{-1} \circ y$ to $y$ proving that it is onto, but I don't know if $r$ is invertible. Is this approach correct? What should I do?
Let $c:[0,1]\rightarrow A$ be a loop and $[c]$ its class in $\pi_1(A)$, consider $i:A\rightarrow X$ the canonical inclusion $r_*(i_*([c]))=(r\circ i)_*([c])=[c]$.