\(\frac{\left(\sqrt{x}-3\right)^2+12\sqrt{x}}{3+\sqrt{x}}=\) \(\frac{x-6\sqrt{x}+9+12\sqrt{x}}{3+\sqrt{x}}\)
\(=\frac{x+6\sqrt{x}+9}{3+\sqrt{x}}\)
\(=\frac{\left(3+\sqrt{x}\right)^2}{3+\sqrt{x}}\)
\(=3+\sqrt{x}\)
\(\frac{\left(\sqrt{x}-3\right)^2+12\sqrt{x}}{3+\sqrt{x}}\left(x\ge0\right)=\frac{x-6\sqrt{x}+9+12\sqrt{x}}{3+\sqrt{x}}\)
\(=\frac{x+\sqrt{6}+9}{3+\sqrt{x}}=\frac{\left(\sqrt{x}+3\right)^2}{3+\sqrt{x}}=3+\sqrt{x}\left(x\ge0\right)\)