For $k > 1$ we know that $\pi_1(\mathbb RP^k) \approx \mathbb Z_2$. Thus $\pi_1(\mathbb RP^k)$ has a single non-trivial element (which is of course the generator of the fundamental group, but that is irrelevant here).
Let us first recall the following well-known fact:
Let $p : \tilde X \to X$ be a covering map, $x_0 \in X$ be a basepoint and $\tilde x_0 \in p^{-1}(x_0)$. Each loop $u : [0,1] \to X$ based at $x_0$ has a unique lift to a path $\tilde u : [0,1] \to \tilde X$ such that $\tilde u(0) = \tilde x_0$ ("lift" means $p \circ \tilde u = u$). Its endpoint $\tilde u(1)$ is contained in $p^{-1}(x_0)$.
If $\tilde X$ is simply connected, then $\tilde u(1) = \tilde x_0$ (i.e.$ \tilde u$ is a loop based at $\tilde x_0$) iff $u$ represents the trivial element of $\pi_1(X,x_0)$.
Let us apply this to the standard covering map $p : S^k \to \mathbb RP^k$. Consider a loop $u : [0,1] \to \mathbb RP^k$ based at $x_0$. Since $p^{-1}(x_0) = \{y_0, - y_0\}$, we conclude that $\tilde \gamma(1) = -y_0$ (i.e. $\tilde \gamma$ joins the two antipodal points $y_0, -y_0$) iff $\gamma$ represents the non-trivial element of $\pi_1(\mathbb RP^k,x_0)$.
Now let us return to the proof given in your question.
It is clear that $\tilde{\gamma}:[0,1]\to S^n$ joins two antipodal points $y_0, -y_0$. Then $g \circ \tilde{\gamma}:[0,1]\to S^{n-1}$ joins the points $g(y_0), g(-y_0) \in S^{n-1}$. But since $g(y)=−g(−y)$ for all $y$, we see that $g(-y_0) = -g(y_0)$ which means that $g \circ \tilde{\gamma}$ joins two antipodal points. Hence $\lambda = p \circ g \circ \tilde{\gamma}$ is a loop based at $x_0' = p(g(y_0)) \in \mathbb RP^{n-1}$ which represents the non-trivial element in $\pi_1(\mathbb RP^{n-1},x_0')$.
It remains to show that $\tilde g_*([\gamma]) = [\lambda]$ which means that $\tilde g_* : \pi_1(\mathbb RP^{n}) \to \pi_1(\mathbb RP^{n-1})$ is an isomorphism. Consider the commutative diagram
$\require{AMScd}$
\begin{CD}
[0,1] @>{\tilde \gamma}>> S^n @>{g}>> S^{n-1} \\
@V{id}VV @V{p}VV @VV{p}V \\
[0,1] @>{\gamma}>> \mathbb RP^{n} @>{\tilde g}>> \mathbb RP^{n-1}
\end{CD}
This shows that $g \circ \tilde \gamma$ is the unique lift of $\tilde g \circ \gamma$ starting at $g(y_0) \in p^{-1}(x_0'))$. Therefore
$$\tilde g_*([\gamma] = [\tilde g \circ \gamma] = [\tilde g \circ p \circ \tilde \gamma] = [p \circ g \circ \tilde \gamma] = [\lambda] .$$