We are given the functions $f:A\rightarrow B$ and $g:B\rightarrow A$ with the property that $g\circ f=i_A$.
I have so far shown that $f$ is injective and $g$ is surjective. Now, I am stuck with trying to show that if $f$ is surjective, then $g$ is injective.
I think an easy approach to this question would be with a proof by contrapositive.
Help is really much appreciated.