b,ĐKXĐ: \(\left\{{}\begin{matrix}x\ge0\\x\ne1\end{matrix}\right.\)
\(\Rightarrow P=\dfrac{\left(\sqrt{x}+2\right)\left(\sqrt{x}-1\right)-\left(\sqrt{x}-2\right)\left(\sqrt{x}+1\right)}{\left(\sqrt{x}+1\right)^2\left(\sqrt{x}-1\right)}.\sqrt{x}\left(\sqrt{x}+1\right)\)
\(\Rightarrow P=\dfrac{x+\sqrt{x}-2-x+\sqrt{x}+2}{\left(\sqrt{x}+1\right)^2\left(\sqrt{x}-1\right)}.\sqrt{x}\left(\sqrt{x}+1\right)\)
\(\Rightarrow P=\dfrac{2\sqrt{x}.\sqrt{x}\left(\sqrt{x}+1\right)}{\left(\sqrt{x}+1\right)^2\left(\sqrt{x}-1\right)}\)
\(\Rightarrow P=\dfrac{2x}{\left(\sqrt{x}+1\right)\left(\sqrt{x}-1\right)}\)
\(\Rightarrow P=\dfrac{2x}{x-1}\)
b, để P nguyên \(P=\dfrac{2x}{x-1}\) nguyên \(\Rightarrow2x⋮\left(x-1\right)\Rightarrow\left(2x-2+2\right)⋮\left(x-1\right) \Rightarrow\left[2\left(x-1\right)+2\right]⋮\left(x-1\right)\)
mà \(2\left(x-1\right)⋮\left(x-1\right)\Rightarrow2⋮x-1\Rightarrow x-1\inƯ\left(2\right)=\left\{\pm1;\pm2\right\}\Rightarrow x\in\left\{-1;0;2;3\right\}\)
\(b,ĐK:x\ge0;x\ne1\\ P=\dfrac{\left(\sqrt{x}+2\right)\left(\sqrt{x}-1\right)-\left(\sqrt{x}-2\right)\left(\sqrt{x}+1\right)}{\left(\sqrt{x}+1\right)^2\left(\sqrt{x}-1\right)}\cdot\sqrt{x}\left(\sqrt{x}+1\right)\\ P=\dfrac{x+\sqrt{x}-2-x+\sqrt{x}+2}{\left(\sqrt{x}+1\right)\left(\sqrt{x}-1\right)}\cdot\sqrt{x}\\ P=\dfrac{2\sqrt{x}\cdot\sqrt{x}}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)}=\dfrac{2x}{x-1}\\ b,P=\dfrac{2\left(x-1\right)+2}{x-1}=2+\dfrac{2}{x-1}\in Z\\ \Leftrightarrow x-1\inƯ\left(2\right)=\left\{-2;-1;1;2\right\}\\ \Leftrightarrow x\in\left\{0;2;3\right\}\left(x\ge0\right)\)