$6.274 x^{2}+\frac{81 x^{2}}{(9+x)^{2}}=40$.
Solution. $x^{2}(9+x)^{2}+81 x^{2}=40(9+x)^{2} \Leftrightarrow x^{2}\left((9+x)^{2}+81\right)=40(9+x)^{2} \Leftrightarrow$ $x^{2}\left(x^{2}+18 x+162\right)=40(9+x)^{2} \Leftrightarrow x^{2}\left(x^{2}+18(x+9)\right)=40(9+x)^{2}$.

Let $u=x^{2}, v=x+9$, then $u(u+18 v)=40 v^{2} \Leftrightarrow$ $u^{2}+18 u v-40 v^{2}=0 \Leftrightarrow u=-9 v \pm \sqrt{81 v^{2}+40 v^{2}} \Leftrightarrow\left[\begin{array}{l}u=-20 v \\ u=2 v\end{array} \Leftrightarrow\right.$ $\Leftrightarrow\left[\begin{array}{l}x^{2}+20 x+180=0, \\ x^{2}-2 x-18=0\end{array} \Leftrightarrow x=1 \pm \sqrt{19}\right.$.

Answer: $x_{1}=1+\sqrt{19}, x_{2}=1-\sqrt{19}$.