Are you familiar with "polar form" of a complex number? i.e. Euler's Identity? Using this approach my result is that ##x=y##
I'll get you started.
Here are some basic formulas. You can derive them if you want or you can just accept them for the time being.
##z = re^{i \theta} = r \cos \theta + i r \sin \theta##
##\text{Im} \left(z\right) = \frac{re^{i \theta} - re^{-i \theta}}{2i}##
##z^2 = r^2 e^{i 2 \theta}##
##\text{Im} \left( z^2\right) =##?
##\frac{\text{Im} \left(z^2 \right)}{z^2} = ##? (You should get ##-i##)
Equate the real parts to the real parts, the imaginary parts to the imaginary parts and go from there.
You should get ##\theta = \frac{\pi}{4}##