This is from Borceux' Handbook of Categorical Algebra, volume II, p.39, proposition 1.9.5.
First, a few notational conventions are in order:
A pseudo-element of an element $X$ of an abelian category is a morphism with codomain $X$. Two pseudo-elements $x,x'$ of $X$ are pseudo-equal, writing $x =^* x'$, if are epimorphisms $p,q$ such that $x\circ p = x'\circ q$. This is an equivalence relation on the set (or a class, depending on your foundations) of pseudo-elements of $X$. For a morphism $f\colon X\to Y$, the image of a pseudo-element $x$ of $X$ under $f$, denoted by $f(x)$, is $f\circ x$.
Now here goes the relevant proposition:
In an abelain category $\mathsf{C}$ consider a pullback $(X, h\colon X\to Z, k\colon X\to Y)$ of the pair $(f\colon Z\to W, g\colon Y\to W)$. Given two pseudo-elements $z \in* Z$ and $y \in^* Y$ such that $f(z) =^* g(y)$, there exists a pseudo-unique (meaning unique up to pseudo-equality) pseudo-element $x \in* X$ such that $h(x) =^* z, k(x) =^* y$.
The proof from the book:
If $f(z) =^* g(y)$, then there are epimorphisms $p,q$ such that $f\circ z\circ p = g\circ y\circ q$. By definition of a pullback, this implies the existence of some $x \in* X$ such that $h\circ x = z\circ p, k\circ x = y\circ q$. In particular $h(x) =^* z$ and $k(x) =^* y$.
Consider now $x' \in* X$ such that $h(x') =^* z$ and $k(x') =^* y$. There are epimorphisms $p',q',p'',q''$ such that $h\circ x'\circ p' = z\circ q'$ and $k\circ x'\circ p'' = y\circ q''$. All the epimorphisms $p,p',p'',q,q',q''$ can, by successive pullbacks, be replaced by epimorphisms with the same domain, from which $x =^* x'$.
I don't understand the last part - the one in bold. I know that being an epimorphism is invariant under pullbacks in an abelian category (this was proved in the book before), but how do you obtain epimorphisms with the same domain by computing pullbacks in this case?
Suppose you have epimorphisms $p : A\to Y, q:B\to Y$
You can then form their pullback :
$\require{AMScd}\begin{CD} A\times_Y B @>\alpha>> A \\ @V\beta VV @VpVV \\ B @>q>> Y \end{CD}$
Now both $\alpha$ and $\beta$ are epis (stability of those under pullback in an abelian category), and $p\circ \alpha, q\circ \beta$ have the same domain and "play the same role" as $p,q$.
If you do this successively, you can get $p,p',p'',q,q',q''$ to have the same domain and still be epimorphisms and obtained from the old ones by composing on the right, which doesn't change anything to the equalities you already have
So up to a bunch of epis, you get $x$ and $x'$ to have the same composition with $f,g$, so that by the universal property, $x=x'$ up to a bunch of epis, which exactly means $x=^*x'$.