a) Ta có: \(P=\dfrac{x\sqrt{x}-3}{x-2\sqrt{x}-3}-\dfrac{2\left(\sqrt{x}-3\right)}{\sqrt{x}+1}+\dfrac{\sqrt{x}+3}{3-\sqrt{x}}\)
\(=\dfrac{x\sqrt{x}-3-2\left(\sqrt{x}-3\right)^2-\left(\sqrt{x}+3\right)\left(\sqrt{x}+1\right)}{\left(\sqrt{x}-3\right)\left(\sqrt{x}+1\right)}\)
\(=\dfrac{x\sqrt{x}-3-2\left(x-6\sqrt{x}+9\right)-x-4\sqrt{x}-3}{\left(\sqrt{x}-3\right)\left(\sqrt{x}+1\right)}\)
\(=\dfrac{x\sqrt{x}-4\sqrt{x}-6-2x+12\sqrt{x}-18}{\left(\sqrt{x}-3\right)\left(\sqrt{x}+1\right)}\)
\(=\dfrac{x\sqrt{x}-2x+8\sqrt{x}-24}{\left(\sqrt{x}-3\right)\left(\sqrt{x}+1\right)}\)