P = \(\frac{2\sqrt{x}}{\sqrt{x}+3}+\frac{\sqrt{x}+1}{\sqrt{x}-3}+\frac{3+7\sqrt{x}}{9-x}\)
= \(\frac{\left(2\sqrt{x}\right)\left(\sqrt{x}-3\right)+\left(\sqrt{x}+1\right)\left(\sqrt{x}+3\right)-\left(3+7\sqrt{x}\right)}{\left(\sqrt{x}+3\right)\left(\sqrt{x}-3\right)}\)
= \(\frac{2x-6\sqrt{x}+x+3\sqrt{x}+\sqrt{x}+3-3-7\sqrt{x}}{\left(\sqrt{x}+3\right)\left(\sqrt{x}-3\right)}\)
= \(\frac{3x-9\sqrt{x}}{\left(\sqrt{x}+3\right)\left(\sqrt{x}-3\right)}\)
= \(\frac{3\sqrt{x}\left(\sqrt{x}-3\right)}{\left(\sqrt{x}+3\right)\left(\sqrt{x}-3\right)}\)
= \(\frac{3\sqrt{x}}{\sqrt{x}+3}\)