In the book says: Consider the cases $x=y$, $x \not =y$, separately. Use Axiom of extent.
Case 1: $(x=y)$
If $x=y$ by hypothesis $\{x\}=\{u,v\}$. Let $z\in \{u,v\}$, by hypothesis we have $z\in\{x\}$, then $u=x \land v=x$. Using idempotence rule: $$(u=x \land v=x) \lor (u=x \land v=x)$$ By hypothesis: $$(u=x \land v=y) \lor (u=y \land v=x)$$.
But, how i can prove the proposition with $x\not =y$ ?.
Thanks