Claim:
Consider a category, such that for any two objects $X,Y$ there exists an object $Z$ and  epimorphisms $Z\twoheadrightarrow X$ and $Z\twoheadrightarrow Y$.
We call such a $Z$ and the epis a common cover of $X$ and $Y$.

Let
 
[![enter image description here][1]][1]

be a Cartesian square.
We shall write $[p]$ for a generalized element with representative $p$.
Let $[p],[p']$ be two generalised elements of $P$ such that $f^*([p])=f^*([p'])$ and $g^*([p])=g^*([p'])$.
Then $[p]=[p']$.

Proof:
Replacing the domains of $p$ and $p'$ with a common cover, we can assume, that they have the same domain $D$.
The equation $g^*(p)=g^*(p')$ means that we have two commutative  diagrams

[![enter image description here][2]][2]


withe the same $eta$.
We can replace $D$ by $D'$ and get a diagram

[![enter image description here][3]][3]

which commutes for $p$ and for $p'$ separately.
In the same way we get an arrow $D\to B$ such that the diagram

[![enter image description here][4]][4]


which commutes for $p$ and for $p'$.
But now the uniqueness in the definition of a Cartesian square yields $p=p'$.


  [1]: https://i.sstatic.net/vHFxh.png
  [2]: https://i.sstatic.net/fFfXU.png
  [3]: https://i.sstatic.net/4S7vD.jpg
  [4]: https://i.sstatic.net/FaLOn.jpg