Is the following solution correct? Question: $ \sqrt{x^2 + 1} + \frac{8}{\sqrt{x^2 + 1}} = \sqrt{x^2 + 9}$
My solution: $(x^2 + 1) + 8 = \sqrt{x^2 + 9} \sqrt{x^2 + 1}$
$=> (x^2 + 9) = \sqrt{x^2 + 9} \sqrt{x^2 + 1}$
$=> (x^2 + 9) - \sqrt{x^2 + 9} \sqrt{x^2 + 1} = 0$
$=> \sqrt{x^2 + 9} (\sqrt{x^2 + 9} - \sqrt{x^2 + 1}) = 0$
So, either $\sqrt{x^2 + 9} = 0$ or $(\sqrt{x^2 + 9} - \sqrt{x^2 + 1}) = 0$
From the first expression, I get $x = \pm 3 i$ and from the second expression, I get nothing.
Now, notice how in the 2nd step, I could've divided both the sides by $\sqrt{x^2 + 9}$, but I didn't because I learned here that we must never do that and that we should always factor: Why one should never divide by an expression that contains a variable.
So, my question is: is the solution above correct? Would it have been any harm had I divided both the sides by $\sqrt{x^2 + 9}$?

Try a different method.
Take $\sqrt{x^2 +1}$ on RHS Then rationalise $\sqrt{x^2+9}$ - $\sqrt{x^2 +1}$ by it's conjugate.
So your next step would be :
$\dfrac{8}{\sqrt{x^2+1}}$[$\sqrt{x^2+9}$ + $\sqrt{x^2 +1}$] =  8
So 8 gets cancelled. and next step is as follows:
$\dfrac{\sqrt{x^2+9} + \sqrt{x^2 +1}}{\sqrt{x^2+1}}$ =  1
and so we get $\dfrac{\sqrt{x^2+9}}{\sqrt{x^2+1}}$  + 1 =  1
And finally 
 $\dfrac{\sqrt{x^2+9}}{\sqrt{x^2+1}}$ =  0
And only Numerator becomes zero so $\sqrt{x^2+9}=0$ hence $x=\pm3i$.
