Ta có: \(P=\left(1-\dfrac{x-3\sqrt{x}}{x-9}\right):\left(\dfrac{\sqrt{x}-3}{2-\sqrt{x}}+\dfrac{\sqrt{x}-2}{3+\sqrt{x}}-\dfrac{9-x}{x+\sqrt{x}-6}\right)\)
\(=\left(1-\dfrac{\sqrt{x}\left(\sqrt{x}-3\right)}{\left(\sqrt{x}-3\right)\left(\sqrt{x}+3\right)}\right):\left(\dfrac{-\left(\sqrt{x}-3\right)\left(\sqrt{x}+3\right)}{\left(\sqrt{x}-2\right)\left(\sqrt{x}+3\right)}+\dfrac{\left(\sqrt{x}-2\right)^2}{\left(\sqrt{x}+3\right)\left(\sqrt{x}-2\right)}-\dfrac{9-x}{\left(\sqrt{x}+3\right)\left(\sqrt{x}-2\right)}\right)\)
\(=\left(1-\dfrac{\sqrt{x}}{\sqrt{x}+3}\right):\left(\dfrac{-\left(x-9\right)+x-4\sqrt{x}+4-9+x}{\left(\sqrt{x}-2\right)\left(\sqrt{x}+3\right)}\right)\)
\(=\dfrac{\sqrt{x}+3-\sqrt{x}}{\sqrt{x}+3}:\dfrac{-x+9+2x-4\sqrt{x}-5}{\left(\sqrt{x}-2\right)\left(\sqrt{x}+3\right)}\)
\(=\dfrac{3}{\sqrt{x}+3}\cdot\dfrac{\left(\sqrt{x}-2\right)\left(\sqrt{x}+3\right)}{x-4\sqrt{x}+4}\)
\(=\dfrac{3\left(\sqrt{x}-2\right)}{\left(\sqrt{x}-2\right)^2}=\dfrac{3}{\sqrt{x}-2}\)