Solve an equation of 4th degree

$$x^2+\dfrac{81x^2}{(9+x)^2}=40$$. $$x^2-\frac{18x^2}{x+9}+\frac{81x^2}{(x+9)^2}+\frac{18x^2}{x+9}=40$$ $$\left( x-\frac{9x}{x+9}\right)^2+\frac{18x^2}{x+9}=40$$ $$\left( \frac{x^2}{x+9}\right)^2+\frac{18x^2}{x+9}=40$$ Let $$\frac{x^2}{x+9}=t$$ Then $t^2+18t-40=0$. Then $t=-20$ or $t=2$.

$\frac{x^2}{x+9}=-20$ or $\frac{x^2}{x+9}=2$

$x^2+20x+180=0$ or $x^2-2x-18=0$

$x=1\pm\sqrt{19}$

Addition:

Solve the following equation $A^2(x)+B^2(x)=c$, where $A(x)-B(x)=A(x)B(x)$ Then $$A^2(x)-2A(x)B(x)+B^2(x)+2A(x)B(x)=C$$ $$(A(x)-B(x))^2+2A(x)B(x)=c$$ Then $A(x)-B(x)=A(x)B(x)=t$

For example: enter image description here