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

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$.
