This is a problem from Dugundji's book, page $156$.
Let $f: X \rightarrow Y$, $g: Y \rightarrow X$ be continuous such that $g \circ f=1_{X}$. Prove that:
If $Y$ is Hausdorff then so also is $X$ (done)
$f(X)$ is closed in $Y$
I don't see how to show 2. Can you please help?