Proof. If
$a=c$ and
$b=d$ then
$(a,b)=\{\{a\},\{a,b\}\}=\{\{c\},\{c,d\}\}=(c,d)$
Assume that $(a,b)=(c,d)$ and $a=b$ Then $\{\{c\},\{c,d\}\}=(c,d)=(a,b)=\{\{a\},\{a,b\}\}=\{\{a\},\{a,a\}\}=\{\{a\},\{a\}\}=\{\{a\}\}$ Thus, $\{c,d\}\in\{\{a\}\}$ Therefore, $\{c,d\}=\{a\}$ Hence, $a=c$ and $a=d$ Since it was also assumed that $a=b$ it follows that $a=c$ and $b=d$
Finally, assume that $(a,b)=(c,d)$ and $a \neq b$ Then $\{a\} \neq \{a,b\}$ Note that $\{\{a\},\{a,b\}\}=(a,b)=(c,d)=\{\{c\},\{c,d\}\}$ Thus, $\{c\} \in \{\{a\},\{a,b\}\}$ It cannot be the case that $\{c\}=\{a,b\}$ (lest $a=c=b$ . Thus, $\{c\}=\{a\}$ Therefore, $a=c$ Hence, $\{\{a\},\{a,b\}\}=\{\{c\},\{c,d\}\}=\{\{a\},\{a,d\}\}$ Note that $\{a,b\} \in \{\{a\},\{a,d\}\}$ Since $\{a\} \neq \{a,b\}$ it must be the case that $\{a,b\}=\{a,d\}$ Thus, $b \in \{a,d\}$ Since $a \neq b$ it must be the case that $b=d$ It follows that $a=c$ and
$b=d$ 