First definition:
$$\exists!x:P(x)\iff\exists x(P(x)\wedge\forall y(P(y)\implies y=x))$$
Second definition:
$$\exists!x:P(x)\iff\exists x(P(x)\wedge\forall y\forall z(P(y)\wedge P(z)\implies y=z))$$
I already know that the second definition of uniqueness implies the first one, because if the predicate holds true for all values of $z$, then it also holds true for only the values of $z$ for which $z=x$, which would leave us with a predicate which is equivalent to the first definition. But how do I prove that the first definition of uniqueness also implies the second one?



It is basically the same reasoning. Because a universal statement (form of $\forall y~Q(y)$) can be eliminated to arbitrary variables of any letter (ie: not just $y$, but also $z$).
So take arbitrary $y$ and arbitrary $z$ and derive $~P(y)\land P(z) \to y=z~$ by way of $~P(y)\to y=x~$ and $~P(z)\to z=x~$ and equality elimination.