Induced morphism between kernels is surjective Let $\mathcal{A}$ be an abelian category. Given a commutative square
$$
\require{AMScd}
\begin{CD}
A@>f>>B\\
@VVV@VVV\\
A'@>>{f'}>B'
\end{CD}
$$
in $\mathcal{A}$, we get an induced morphism between kernels $\operatorname{Ker}f\to\operatorname{Ker}f'$, namely, the unique one that makes the diagram
$$
\require{AMScd}
\begin{CD}
\operatorname{Ker} f@>>>A\\
@VVV@VVV\\
\operatorname{Ker}f'@>>{}>A'
\end{CD}
$$
commutative. I was trying to prove the following

Lemma. Let
$$
\require{AMScd}
\begin{CD}
A\times_CB@>{p}>>A\\
@V{q}VV@VV{f}V\\
B@>>{g}>C
\end{CD}
$$
be a cartesian square in $\mathcal{A}$. If $h:D\twoheadrightarrow A\times_CB$ is a surjection, then the induced morphism between kernels from the commutative square
$$
\require{AMScd}
\begin{CD}
D@>>>A\\
@VVV@VV{f}V\\
B@>>{g}>C
\end{CD}
$$
is also surjective.

For me “surjective morphism” in an abelian category means an epimorphism or a morphism with zero cokernel (these two conditions are equivalent).
The proof is easily done in $\mathcal{A}=R\operatorname{-Mod}$ the category of left $R$-modules: if $b\in B$ is such that $g(b)=0$, then $(0,b)\in A\times_CB$, and there is $d\in D$ such that $h(d)=(0,b)$. Thus $d\in\operatorname{Ker}(D\to A)$. Also, in particular $d$ maps to $b$ in $B$. How one would do the proof in general? Is it okay to invoke Mitchell's embedding theorem or is it an overkill because there is an easier way? I don't exactly know how to translate the preceding element-wise diagram-chasing to a morphism-wise chasing using universal properties.
Edit: Okay this is what I've come up with so far. Using the universal property of the fibre product, there exists a morphism $\operatorname{Ker}g\to A\times_C B$ such that in the diagram

the composite $\operatorname{Ker}g\to A\times_CB\xrightarrow{q} B$ equals $\operatorname{Ker}g\to B$ and the composite $\operatorname{Ker}g\to A\times_CB\xrightarrow{p}A$ vanishes. Moreover, the morphism $\operatorname{Ker}g\to A\times_CB$ has to injective since after post-composition with $q$ we get an injective morphism $\operatorname{Ker}g\to B$. Also we have that the top left triangle of the diagram commutes, since equality of the two sides of the triangle can be verified after post-composition with $p$ and $q$.
But now I don't know how to continue. I haven't used the surjectivity of $h$ yet, and I don't know how to use it exactly.

For those who may ask why am I interested on this result: I'm trying to understand the proof of 05T7 of the Stacks Project. The proof is done by induction, and the verification of the induction hypothesis $IH_{n-1}$, which “the reader easily checks,” require to verify that an induced morphism between kernels is surjective. The above lemma abstracts the situation from the proof.
I know that there are posts here on MSE that address the same result I've linked from the Stacks Project, like this one. However, this last post uses other strategy, and I was interested on understanding the one from the SP.
 A: Edit: the answer is essentially the same, but I simplified it a little, added details, and a new picture. I have also slightly changed my notations to better adapt them to yours.

Consider the following commutative diagram with exact rows, where the lower right square is your pullback and $h$ is your epimorphism:

In the notation of the above picture, you are asking to prove that the composition $f''\circ p$ is an epimorphism. Of course, it is enough to show that both $f''$ and $p$ are epimorphisms:

*

*$f''$ is an epimorphism: note that the maps $k\colon \ker(g)\to B$ and $0\colon \ker(g)\to A$ are such that $g\circ k=0=f\circ 0$ so that, by the universal property of the pullback, there is a unique morphism $\bar k\colon \ker(g)\to A\times_CB$ such that $f'\circ \bar k=k$ and $g'\circ \bar k=0$. The latter condition tells us that, by the universal property of the kernel, there is a unique morphism $\tilde k\colon \ker(g)\to \ker(g')$ such that $k'\circ\tilde k=\bar k$. Then,
$$k\circ f''\circ \tilde k=f'\circ k'\circ \tilde k=f'\circ \bar k=k=k\circ \mathrm{id}_{\ker(g)},$$
which shows that $f''\circ \tilde k=\mathrm{id}_{\ker(g)}$ since $k$ is a monomorphism. In particular, $f''$ is an epimorphism. (In fact, $f''$ is an isomorphism, see The Stacks project, Tag: 08N3, with inverse $\tilde k$, but this is not needed here).


*$p$ is an epimorphism: just note that $\ker(g'')=h^{-1}(\ker(g'))$, that is, the upper left square is also a pullback, and epimorphisms are pullback stable (see, e.g., The Stacks project, Tag: 08N4).
