<s>[INST] Is this operation legal? Is this operation allowed?
Going from this: 
$\left ( \frac{x^{2}+6}{x^{2}-4} \right )^{2}= \left ( \frac{5x}{4-x^{2}} \right )^{2}$
To this: $\left ( \frac{\left (x^{2}+6  \right )\left ( 4-x^{2} \right )}{\left (x^{2}-4  \right )5x} \right )^{2}= 1$
 [/INST] As others have noted, it is valid so long as $x\ne0,$ since otherwise you're dividing by $0$. Let me offer another approach, using the difference of squares formula $a^2-b^2=(a-b)(a+b)$, together with the fact that $(-c)^2=c^2.$ The following, then, are equivalent:
$$\left(\frac{x^2+6}{x^2-4}\right)^2=\left(\frac{5x}{4-x^2}\right)^2$$
$$\left(\frac{x^2+6}{x^2-4}\right)^2=\left(\frac{5x}{x^2-4}\right)^2$$
$$\left(\frac{x^2+6}{x^2-4}\right)^2-\left(\frac{5x}{x^2-4}\right)^2=0$$
$$\left(\frac{x^2+6}{x^2-4}-\frac{5x}{x^2-4}\right)\left(\frac{x^2+6}{x^2-4}+\frac{5x}{x^2-4}\right)=0$$
$$\frac{x^2-5x+6}{x^2-4}\cdot\frac{x^2+5x+6}{x^2-4}=0.$$
Now, note that none of the above equations make sense when $x=\pm 2,$ since $x^2-4=(x-2)(x+2).$ So, we must assume that $x\neq 2$ and $x\neq-2$. At that point, the last equation is readily equivalent to $$(x^2-5x+6)(x^2+5x+6)=0,$$ which is true if and only if $x^2-5x+6=0$ or $x^2+5x+6=0$. These two quadratic equations give the solutions $x=\pm 2,\pm3,$ and so since we had to rule out $x=\pm 2,$ we get $x=\pm 3$.
</s>