This question already has an answer here:
could you please help with the proof?
If a category $K$ has pullbacks. For composable morphisms $f: A\to B$ and $g: B \to C,$ if $g$ and $f$ are extremal epimorphisms, prove that $gf$ is an extremal epimorphism.
The definition of extremal epimorphism I have been given is:
A morphism $e: A \to B$ is an extremal epimorphism when for each commutative diagram $e: A \to B,$ $f: A \to C$, $m: C \to B$ ($e= mf$) if $m$ is monic, then $m$ is an isomorphism.
I have let $f = mk$ and $g = nh$, then I have drawn out the pullbacks of $f$ and $m,$ and of $g$ and $n$.
I don't know where to go from here.