Two sets are equal exactly when they have the same elements, and {u}={v} therefore holds exactly when u=v, while {u,v}={u} holds exactly when v=u.
If x=x′ and y=y′, then {x}={x′} and {x,y}={x′,y′}, so the two sets (x,y) and (x′,y′) of Ordered Pair have the same elements and are equal.
Conversely, suppose (x,y)=(x′,y′), that is
{{x},{x,y}}={{x′},{x′,y′}}.(∗)
Case x=y. Then {x,y}={x}, so the left-hand side of (∗) is {{x}}, whose only element is {x}. Since {x′} and {x′,y′} are elements of the right-hand side, both equal {x}. From {x′}={x} we get x′=x. From {x′,y′}={x} we get y′=x, and since x=y this gives y′=y.
Case x=y. Then {x,y}={x}, since y belongs to the first set and not to the second.
The element {x} of the left-hand side of (∗) belongs to the right-hand side, so {x}={x′} or {x}={x′,y′}. Suppose the latter held. Then x′ and y′ both belong to {x}, so x′=x and y′=x, whence {x′}={x}={x′,y′} and the right-hand side of (∗) is {{x}}. Its only element being {x}, the element {x,y} of the left-hand side would satisfy {x,y}={x}, contradicting x=y. Hence {x}={x′} and therefore x=x′.
The element {x,y} of the left-hand side of (∗) also belongs to the right-hand side, so {x,y}={x′} or {x,y}={x′,y′}. The first is impossible: {x′}={x} and {x,y}={x}. Hence {x,y}={x′,y′}={x,y′}, using x=x′. Now y belongs to {x,y}, hence to {x,y′}, so y=x or y=y′; the first is excluded, so y=y′.
In both cases x=x′ and y=y′, which proves the equivalence. The final assertion follows: if a pair p is written both as (x,y) and as (x′,y′), then x=x′ and y=y′, so the first and second components of p are determined by p alone.