Finding $\sqrt{a+ib}$ How do to find the square root of a complex number?

$z=a+ib$

$z=\sqrt{3+i4}=a+ib$

remove the square by squaring both side

$a^2+2iab+b^2=3+i4$

$a^2+b^2=3$

$2ab=4$

So I just solve the simultaneous equation. But my friend is telling me this way I am doing is wrong. Can anyone give a hand, thank in advance
Be careful : $(a+ib)^{2}=a^{2}-b^{2}+2iab$ !
Much easier: If you want to find $\sqrt{a+ib}$ start by writing $$a+ib=re^{it}$$for some $r&gt;0$ and $t\in\mathbb R$.