# In abelian category, a pullback whose below line is epic is a pushout. Why?

I don't know why the following statement is true:

Theorem : In an abelian category, if the following diagram $$\require{AMScd}$$ $$\begin{CD} X' @>{f'}>> Y' \\ @V{g'}VV @VV{g}V\\ X @>>{f}> Y \end{CD}$$ is a pullback and $$f$$ is an epimorphism, then the diagram is a pushout.

My attempt :

Assume that we are given the following commutative diagram: $$\require{AMScd}$$ $$\begin{CD} X' @>{f'}>> Y' \\ @V{g'}VV @VV{b}V\\ X @>>{a}> Z \end{CD}$$ Since the following diagram $$\require{AMScd}$$ $$\begin{CD} \mathrm{ker}(f) @>{0}>> Y' \\ @V{i_f}VV @VV{g}V\\ X @>>{f}> Y \end{CD}$$ is commutative, we have a morphism $$k:\mathrm{ker}(f)\to X'$$ such that $$g'k=i_f$$ and $$f'k=0$$.

Then, $$ai_f=ag'k=bf'k=0b=0$$. And since $$f$$ is epi, $$(Y,f)$$ is a cokernel of $$i_f$$. Then we can make $$h:Y\to Z$$ such that $$hf=a$$. But, how can i show that $$hg=b$$?

A commutative diagram like yours induces a complex $$X'\stackrel{\iota}\to X\oplus Y'\stackrel{\pi}\to Y$$ where $$\iota$$ is $$(g',f')$$ and $$\pi$$ is $$(-f,g)$$. The commutative square is a pullback iff $$\iota=\ker\pi$$ and a pushout iff $$\pi=\text{coker}\,\iota$$.
As you have a pullback, $$0\to X'\stackrel{\iota}\to X\oplus Y'\stackrel{\pi}\to Y$$ is an exact sequence. If $$f$$ is epi, so is $$\pi$$ and so we have a short exact sequence $$0\to X'\stackrel{\iota}\to X\oplus Y'\stackrel{\pi}\to Y\to0.$$ Then $$\pi=\text{coker}\,\iota$$: the commutative square is a pushout.