Homotopy of functions of $S^1$ and $\mathbb{R}P^2$ So I was doing an exercise that asked me that if there exist two functions $g \colon S^1 \rightarrow \mathbb{R}P^2$ and $f\colon\mathbb{R}P^2 \rightarrow S^1 $ then $f \circ g$ is homotopic to the identity in $S^1$. I think this is false and my argument is as follows. Lets suppose that it is true, then we know that the homomorphism of fundamental groups induced by $f\circ g$ is the trivial one since we are going to have in one part a homomorphism from $\mathbb{Z}_2$ to $\mathbb{Z}$. So if we have a loop $\gamma$ in the fundamental group of $S^1$, $f\circ  g\circ \gamma \sim e$ where $e$ is the identity. Since we are assuming that $f\circ g $ is homotopic to the identity function, then we can use this homotopy to show that $\gamma \sim f\circ g \circ \gamma$ but by what we showed before this would imply that $\gamma \sim e$ for all the elements of the fundamental group of the circle, which would be a contradiction. So my question is, is this argument correct?

I think your argument is correct, but it can be expressed more succinctly using the functoriality of $\pi_1$.  
You can show that any continuous composition $S^1 \stackrel{g}{\to} \mathbb{R}P^2 \stackrel{f}{\to} S^1$ is null-homotopic by considering the composition  $\pi_1(S^1) \stackrel{\pi_1(g)}{\to} \pi_1(\mathbb{R}P^2) \stackrel{\pi_1(f)}{\to} \pi_1(S^1)$, which must be $0$ since there are no non-zero homomorphisms $\mathbb{Z}/2 \to \mathbb{Z}$. Your arguments about homotopies are already encapsulated in the definition and basic properties of $\pi_1$.
