ler z = (x+iy)^{2} = (1+i)

x^{2}-y^{2}+2xyi = 1-i

comparing real and imaginary parts both the sides

x^{2}-y^{2} = 1 and 2xy = -1______(1)

Now, (x^{2}+y^{2})^{2} = (x^{2}-y^{2})^{2} +4x^{2}y^{2}

(x^{2}+y^{2})^{2} = 1+1=2

x^{2}+y^{2} = rt 2 _______(2)

solve eqn 1 and 2 and u will get ur ans