How can I show that $x$ and $y $ must have the same length where $ x+y $ and $x-y $ are non-zero vectors and perpendicular? 
Problem: Let $x$ and $y$ be non-zero vectors in $\mathbb{R}^n$.
(a) Suppose that $\|x+y\|=\|x−y\|$. Show that $x$ and $y$ must be perpendicular.
(b) Suppose that $x+y$ and $x−y$ are non-zero and perpendicular. Show that $x$
and $y$ must have the same length.

Attempt:
(a)\begin{align*}\|x+y\|^2 & =\|x-y\|^2 \\
(x+y)\cdot (x+y) & =(x-y)\cdot (x-y) \\
\|x\|^2+\|y\|^2+2x\cdot y & =\|x\|^2+\|y\|^2-2x\cdot y \\
2x\cdot y & =-2x\cdot y \\
x\cdot y & =0.
\end{align*}(b)\begin{align*}(x+y)\cdot (x-y) & =0 \\
\|x\|^2-x\cdot y+x\cdot y-\|y\|^2 & =0 \\
\|x\|^2-\|y\|^2 & =0.
\end{align*}Are these attempts correct?
EDITED

$a)$ Using polarization identity
$4\langle x, y\rangle =\|x+y\|^2-\|x-y\|^2=0$
$\langle x, y\rangle =x\cdot y=0$

$b)$ Again using polarization identity
$\begin{align}4\langle x+y, x-y\rangle &=\|(x+y)+(x-y)\|^2-\|(x+y)-(x-y)\|^2\\&=4(\|x\|^2 -\|y\|^2)\end{align}$
Given $\langle x+y, x-y\rangle=0$ implies $\|x\|=\|y\|$
