$\begin{array}{l}P = \dfrac{3x + \sqrt{9x} - 3}{x + \sqrt x - 2} - \dfrac{\sqrt x + 1}{\sqrt x + 2} + \dfrac{\sqrt x + 2}{\sqrt x}\left(\dfrac{1}{1 - \sqrt x} -1\right)\\ ĐKXĐ: \, x > 0; \, x \ne 1\\ P = \dfrac{3x + 3\sqrt x -3}{(\sqrt x -1)(\sqrt x + 2)}-\dfrac{(\sqrt x +1)(\sqrt x - 1)}{(\sqrt x -1)(\sqrt x + 2)}+\dfrac{\sqrt x + 2}{\sqrt x}\left(\dfrac{1- (1 -\sqrt x)}{1 - \sqrt x}\right)\\ = \dfrac{3x + 3\sqrt x - 3 -(x -1)}{(\sqrt x -1)(\sqrt x + 2)} + \dfrac{\sqrt x + 2}{\sqrt x - 1}\\ = \dfrac{2x + 3\sqrt x -2}{(\sqrt x -1)(\sqrt x + 2)} + \dfrac{(\sqrt x + 2)^2}{(\sqrt x -1)(\sqrt x + 2)}\\ = \dfrac{2x + 3\sqrt x - 2 + x + 4\sqrt x + 4}{(\sqrt x -1)(\sqrt x + 2)}\\ = \dfrac{(3\sqrt x +1)(\sqrt x + 2)}{(\sqrt x -1)(\sqrt x + 2)}\\ =\dfrac{3\sqrt x + 1}{\sqrt x - 1}\\ b)\,\,P = \dfrac{3\sqrt x + 1}{\sqrt x - 1} = \dfrac{3\sqrt x -3 + 4}{\sqrt x - 1}=1 + \dfrac{4}{\sqrt x - 1}\\ P \in \Bbb Z \Leftrightarrow \dfrac{4}{\sqrt x - 1} \in \Bbb Z\\ \Leftrightarrow \sqrt x - 1 \in Ư(4) = \left\{-4;-2;-1;1;2;4\right\}\\ Do\,\,x > 0\\ \Rightarrow \sqrt x >0\\ \Rightarrow \sqrt x - 1 > -1\\ nên \,\, \sqrt x - 1 = \left\{1;2;4\right\}\\ \text{Ta có bảng giá trị:}\\\begin{array}{|l|r|} \hline \sqrt x -1 &1&2&4\\ \hline \sqrt x&2&3&5 \\ \hline x &4&9&25 \\ \hline \end{array}\\ \text{Vậy x = {4;9;25}}\\ c)\,\,P = \sqrt x\\ \Leftrightarrow \dfrac{3\sqrt x + 1}{\sqrt x - 1} = \sqrt x\\ \Leftrightarrow 3\sqrt x + 1 = \sqrt x(\sqrt x - 1)\\ \Leftrightarrow 3\sqrt x + 1 = x - \sqrt x\\ \Leftrightarrow x - 4\sqrt x - 1 = 0\\ \Leftrightarrow \left[\begin{array}{l}\sqrt x = 2 - \sqrt5\\\sqrt x = 2 + \sqrt5 \end{array}\right.\\ \Leftrightarrow \left[\begin{array}{l} x = 9 - 2\sqrt5\\ x = 9 + 2\sqrt5 \end{array}\right.\\ Vậy\,\,\,x = 9 \pm 2\sqrt5\end{array}$