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: a) is fine, well done.
For b) you're given $\mathbb{x+y}$ and $\mathbb{x-y}$ are perpendicular, which implies $\mathbb{(x+y)} \cdot \mathbb{(x-y)} = 0$
Now expand and apply the distributive and commutative properties of the dot product. Your end goal is to reach $|\mathbb x| = |\mathbb y|$
A: It's unclear from where you got the starting relations.  That $x+y$ and $x-y$ are perpendicular means that
$$(x+y)\cdot(x-y) = 0 \tag 1$$
and you can start reasoning from there:
$$
0 \stackrel{(1)}= (x+y)\cdot(x-y) = x^2 +yx - xy -y^2 = \|x\|^2 - \|y\|^2
$$
Thus $\|x\|^2 = \|y\|^2$ and taking square root yields $\|x\| = \|y\|$ which means that $x$ and $y$ have same length.

Let $x$ and $y$ be non-zero vectors in $\Bbb R^n$.  Suppose that $x + y = x − y$. Show that $x$ and $y$ must be perpendicular.

Subtracting $x$ yields $y = -y$ and hence $y=0$ which violates the precondition that $y\neq0$.
A: $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\|$
