Working on part (a) and part (b) definitively helps.
In your example in part (b) f was not surjective. Can f ∘ g {\displaystyle f\circ g} possibly be surjective then?