You can rearrange the equation as follows:
[tex] x^2 = -24 [/tex]
Using real numbers, it would be impossible for a square to be negative, but using imaginary numbers it is possible, since [tex] i^2 = -1 [/tex]
So, since [tex] \sqrt{24}^2 = 24 [/tex], we know that
[tex] (i\sqrt{24})^2 = i^2\cdot \sqrt{24}^2 = (-1)\cdot 24 = -24 [/tex]
So, the solutions to the equations are
[tex] x^2 = -24 \iff x = \pm\sqrt{-24} = \pm i \sqrt{24}[/tex]