Solution (source code)

= Solution

For any $c\in C$, <surjectivity> of $g\circ f$ supplies $a\in A$ with $g(f(a))=c$. Taking $b=f(a)\in B$ proves that $c$ has a preimage under $g$. Thus $g$ is <surjective>.