Every factor of product topology $X$, is homeomorphic to a retract of $X$. How can I prove this theorem?

Let $X$ is the topological product of some family $\mathcal A$ of spaces, then every factor is homeomorphic to a retract of $X$.


Let $\mathscr{A}=\{X_i:i\in I\}$ for some index set $I$. Fix a point $p=\langle p(i):i\in I\rangle\in X$. Fix $i_0\in I$, and let $I_0=I\setminus\{i_0\}$. Let
$$Y=\left\{x\in X:\forall i\in I_0\big(x(i)=p(i)\big)\right\}\;.$$


*

*Show that $Y$ is homeomorphic to $X_{i_0}$. HINT: Consider the projection $\pi_i:X\to X_i$.  

*Show that $Y$ is a retract of $X$. HINT: There’s a map from $X$ to $Y$ that’s very much like the projection.


In visualizing all of this it may help to consider that if $I=\{0,1\}$ and $X_0=X_1=\Bbb R$, the point $p$ could be $\langle 2,3\rangle$, and if $i_0=1$, then $Y=\{\langle x,y\rangle\in\Bbb R^2:y=3\}$, the graph of the equation $y=3$. The projection $\langle x,3\rangle\mapsto x$ is pretty clearly a homeomorphism. What’s an equally simple retraction of $\Bbb R^2$ onto $Y$? It should send $\langle x,y\rangle$ to ... what?
