If $|z^2-1|=|z|^2+1$, show that $z$ lies on imaginary axis
Use the fact that $|z|^2 = z\bar{z}$.
Squaring both sides of the given equality yields \begin{align} |z^2-1|^2 &= (z\bar{z} + 1)^2\\ (z^2 - 1)(\bar{z}^2 - 1) &= (z\bar{z} + 1)(z\bar{z}+1)\\ z^2 + 2z\bar{z} + \bar{z}^2 &= 0\\ (z + \bar{z})^2 &= 0\\ z = -\bar{z} \end{align} from which it follows that the real part of $z$ is $0$. (I skipped some simple algebra steps above.)
In triangle inequality $|z_1+z_2|\leq |z_1|+|z_2|$ we have equality iff $z_1=0$ or there is a $\alpha\geq 0$ with $z_2=\alpha z_1$. Then, $$|z^2-1|=|z|^2+1\Leftrightarrow |z^2+(-1)|=|z^2|+|-1|$$ $$\Leftrightarrow z^2=\alpha (-1)\le 0\Leftrightarrow z=\pm\sqrt{\alpha}i$$ so, $z$ belongs to the imaginary axis.