Proof: If $x^n = y^n$ and n is even, then $x=y$ or $x=-y$. This is a problem from Spivak's Calculus 4th ed., Chapter 1, Problem 6(d)

Proof: If $x^n = y^n$ and n is even, then $x=y$ or $x=-y$.

I tried to prove it in the following way but I'm not sure if the proof makes sense, and the author uses another method.
Proof: Let $n=k+1$, $k$ is odd such that $x^{k+1}=y^{k+1}$. This would only be possible if $x^k=y^k$ or $x^k=-y^k$. This is because, if $x^k=y^k$ and $k$ is odd, then $x=y$ (I proved this on a previous exercise). Therefore, $x^k\cdot x = y^k \cdot x \Rightarrow x^{k+1}=y^{k+1}$. 
Similarly, $x^k=-y^k \Rightarrow x=-y \Rightarrow x^{k+1}=y^{k+1}$. Thus, I have proved that $x^{k+1}=y^{k+1}$ is possible only if $x^k=y^k$ or $x^k=-y^k$. As I have already proved, $x^k=-y^k \Rightarrow x=-y$ and $x^k=y^k \Rightarrow x=y $
$\therefore x^n=y^n$ and $n$ is even $\Rightarrow x=y$ or $x=-y$

Let $n=2k$ be even and let $x^n =y^n$
We get $$x^{2k}=y^{2k}$$
Thus $$x^{2k}-y^{2k}=0$$
$$(x^2)^k-(y^2)^k=0$$
Factoring we get 
$$(x^2-y^2)(x^{2k-2}+...+y^{2k-2})=0$$
That implies $$ x^2-y^2=0$$
Thus $$x=\pm y$$
