Why $f'$ is an isomorphism if the rightmost square is a pullback? Here is a really baffling problem for me, which states as follows:

In the following row-exact commutative diagram in an abelian category $$\require{AMScd} \begin{CD}
0 @>>> X'@>>>X@>>>X''\\
@.@V{f'}VV @VVV @VVV\\
0@>>> Y'@>>>Y@>>>Y''
\end{CD}$$
  if the rightmost square is a pullback, then $f'$ is an isomorphism.

It is easy to check that $f'$ is monic by the pullback square and the exactness at $X'$. However I find it rather difficult to show that $f'$ is epic and I cannot figure out how the pullback square may be used in this part of proof. So I would like to ask for some hints to show that $f'$ is an epimorphism, and thanks in advance...
 A: Often its easier to prove something is an isomorphism directly, by constructing an inverse.
The zero morphism $Y' \to X''$ along with the canonical inclusion $Y' \to Y$ create a commutative square (along with $Y''$), so the universal property of pullbacks gives a map $Y' \to X$.
The maps $X' \to Y'$ and $Y' \to X'$ are constructed by the universal properties of the kernels of $Y \to Y''$ and $X \to X''$ respectively.
The same universal property proves they are inverses.

If you've set up the infrastructure for element based reasoning, it's simpler.
$$ X = \{ (a,b) \in Y \times X'' \mid f(a) =g(b) \} $$
(where I've named the bottom and right maps in the pullback square as $f$ and $g$).
Then,
$$ X' = \{ (a,0) \in Y \times X'' \mid f(a) = 0 \} $$
$$ Y' = \{ a \in Y \mid f(a) = 0 \} $$
at which point its easy to see how to construct the isomorphisms between them.
A: Since the composition $Y' \to Y \to Y''$ is 0, by the pullback condition, there is a unique map $Y' \to X$ such that the composition with $X \to Y$ is the map from the diagram, and the composition with $X \to X''$ is 0.  Now, the second condition implies that this map factors uniquely through $X' \to X$, to give a map $Y' \to X'$.
From here, it would remain to show this map is inverse to $f'$.
