a, ĐKXĐ: \(x\ge0;x\ne1\)
\(P=\left(\sqrt{x}-1\right)\left[\frac{\left(1-\sqrt{x}\right)\left(1+\sqrt{x}+x\right)}{1-\sqrt{x}}+\sqrt{x}\right]\left(\frac{1-\sqrt{x}}{\left(1-\sqrt{x}\right)\left(1+\sqrt{x}\right)}\right)^2\\ =\left(\sqrt{x}-1\right)\left(1+\sqrt{x}+x+\sqrt{x}\right)\left(\frac{1}{\sqrt{x}+1}\right)^2\\ =\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)^2\cdot\frac{1}{\left(\sqrt{x}+1\right)^2}=\sqrt{x}-1\)
b, Khi P=2 thì \(\sqrt{x}-1=2\Leftrightarrow\sqrt{x}=3\Leftrightarrow x=9\left(t/m\right)\)
Chúc bạn học tốt nha.