One massive problem is that you assume that $\left(x^2\right)^{1/2} \equiv x$.
Here's a counter example: If $x=-2$ then $x^2=(-2)^2=+4$. Finally $(+4)^{1/2} = \pm 2$.
Clearly $-2$ is not equal to both $+2$ and $-2$ at the same time. There must be a problem!
Note that there is a big difference between $x^{1/2}$ and $\sqrt{x}$. The symbol $x^{1/2}$ represents the solutions to the equation $y=x^2$ while the symbol $\sqrt{x}$ represents the unique, real, positive solution to $y=x^2$. In a similar way $\sqrt[4]{1}=1$ while $1^{1/4} = \{\,\pm 1,\pm\operatorname{i}\,\}.$