a: \(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\cdot\left(\sqrt{x}-1\right)}\cdot\dfrac{\left(\sqrt{x}-1\right)^2\cdot\left(\sqrt{x}+1\right)^2}{2}\)
\(=\dfrac{x-\sqrt{x}-2-x-\sqrt{x}+2}{1}\cdot\dfrac{\sqrt{x}-1}{2}=-\sqrt{x}\left(\sqrt{x}-1\right)\)
b: Để P>0 thì -căn x(căn x-1)>0
=>căn x-1<0
=>0<x<1