Let $p: C\to D$ be a functor, and let $f:y\to x$ be a morphism of $C$. We say that $f$ is *cartesian* if the canonical map $Q:(C\downarrow f) \to P:=(C\downarrow x)\times_{(D\downarrow p(x)} (D\downarrow p(f))$ is a surjective (on objects) equivalence of categories. However, if we write out what the (strict 2-) pullback means, the objects are precisely the pairs of morphisms $g: z\to x$ and $h:p(z)\to p(y)$ such that $p(g)=p(f) \circ h$. If we look at the fibres of $Q$ over objects of $A$, we see that that they are contractible groupoids.

Using the more common definition of a cartesian morphism, we must show that any pair of morphisms $(g, h)$ as above *uniquely* determines an arrow $\ell:z\to y$ such that $f\circ \ell= g$ and $p(\ell)=h$.

I see how the first definition implies the existence of such a map, but how does it determine the map's uniqueness (up to more than a contractible space of choices)?