Prove: Let $x,y \in \mathbb{R}$. If $x^{2}=y^{2}$, then $x=\pm{y}$.
My attempt: If $x^{2}=y^{2}$ then, $\sqrt{x^{2}}=\sqrt{y^{2}}$ $\rightarrow$ $\pm{x}=\pm{y}$ $\rightarrow$ $x=\pm{y}$ and $-x=\pm{y}$. And I think that would leave me $x=y$, $x=-y$, $-x=y$, $-x=-y$.
But let's say $x^{2}=4$, so $y^{2}=4$ $\rightarrow$ $\pm{2}=\pm{2}$ then that would give me $2=2$, $2=-2$, $-2=2$ and $-2=-2$. But I have a problem on the $2=-2$ part.
It's generally a bad idea to "take square roots of both sides." It overcomplicates things, as the correct way to handle it is $\sqrt{x^2}=|x|$. Avoid the absolute value so you can avoid cases. Here's how.
Realize that from $x^2=y^2$ you get $x^2-y^2=0$. Now factor to get $(x+y)(x-y)=0$. But this means at least one of those terms had to be $0$, so $x=\pm y$.