Simple square and square root problem gives different result depending on how it is solved? 1st problem: $(\sqrt{-4})^2$
1st method: $(\sqrt{-4})^2=(2i)^2=-4$
2nd method: $(\sqrt{-4})^2=-4$ (square and square root remove each other)
Different methods were used to complete the same problem and the results match as they should.
2nd problem: $\sqrt{(-4)^2}$
1st method: $\sqrt{(-4)^2} = -4$ (again square and square root remove each other)
2nd method: $\sqrt{(-4)^2} = \sqrt16 = 4$ (now we start with the square)
Here completing the same problem with different methods gives different results. This doesn't make sense. I must be missing something or doing something wrong. What is it?
 A: 
1st problem:
working A: $(\sqrt{-4})^2\color\red=(2i)^2=-4$
working B: $(\sqrt{-4})^2=-4$
2nd problem:
working C: $\sqrt{(-4)^2}= -4$
working D: $\sqrt{(-4)^2}= \sqrt{16} \color\red= 4$

In workings A and D, you have interpreted $\sqrt x$ to mean “the square root of $x$ with the smallest nonnegative argument”, so $\sqrt{-4}$ here means $2i$ rather than $-2i$ and $\sqrt{16}$ here means $4$ rather than $-4.\quad$ (This interpretation is defensible; however, when working with complex numbers, it is best to avoid using the radical symbol or to explicitly and carefully define it in the preface of your text.)
In working B, you have interpreted $\sqrt x$ to mean “both square roots of $x$”, so $\sqrt{-4}$ here means $\pm2i.\quad$ (This is a nonstandard usage of the radical symbol, but again, if you must interpret it this way, please explicitly specify this usage in the preface of your text.)
In working C, you have used  false identity $\sqrt {x^2}\equiv x,$ a common mistake: note that, instead, $$\sqrt {x^2}=|x|,$$ so, actually, $\sqrt {(-7)^2}=7\ne-7.$
A: The problem is the interpretation of the symbol $\sqrt{\phantom{X}}$. Each non-zero real or complex number has two square roots which differ by the factor $-1$. Only for non-negative real numbers $x$ there is a standard interpreaton of $\sqrt x$: One takes the non-negative square root. For negative real numbers or for non-real complex numbers $z$ there is no such standard. You could define $\sqrt z$ to be the complex number with positive real part, but as I said: It is no commonly accepted standard.
Anyway, whatever your interpretation of $\sqrt z$ may be, you always get
$$(\sqrt z)^2 = z .$$
This simply reflects the definition that a square root $w$ of $z$ is characterized by $w^2 = z$.
What about $\sqrt{w^2}$? You claim that we always get $\sqrt{w^2} = w$. But this is not true. If you give a universal interpretation to $\sqrt z$ (e.g. as above) and do not make an individual choice, you must admit that sometimes we get $\sqrt{w^2} = w$ and sometimes $\sqrt{w^2} = -w$. The latter happens certainly if $w < 0$. In fact, for real $w$ we get $\sqrt{w^2} = \lvert w \rvert$ since we take the non-negative square root.
