a) \(ĐK:x>0,x\ne1\)\(Q=\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)}.\dfrac{\sqrt{x}+1}{\sqrt{x}}\)
\(=\dfrac{x+\sqrt{x}-2-x+\sqrt{x}+2}{\sqrt{x}\left(\sqrt{x}+1\right)\left(\sqrt{x}-1\right)}\)
\(=\dfrac{2}{x-1}\)
b) \(P=\dfrac{2}{x-1}\in Z\)
\(\Rightarrow x-1\inƯ\left(2\right)=\left\{-2;-1;1;2\right\}\)
Kết hợp với đk
\(\Rightarrow x\in\left\{0;2;3\right\}\)