In triangle ABC , AB = x cm , BC = (4-x) cm , angle BAC = y degrees and angle BCA = 30 degrees.

Given that sin y = $\displaystyle \frac{1}{\sqrt{2}}$, show that $\displaystyle x=4(\sqrt{2}-1)$

what i got is:

$\displaystyle \frac{(4-x)}{\sin y}=\frac{x}{\sin 30}\\x=2\sqrt{2}-\frac{\sqrt{2}x}{2}\\2x=4\sqrt{2}-\sqrt{2}x\\x(2-\sqrt{2})=4\sqrt{2}\\x=2\sqrt{2}-4\\x=2(\sqrt{2}-2)$

where did i go wrong ?