a) Ta có: \(P=\left(\frac{1}{\sqrt{x}-1}-\frac{2}{x\sqrt{x}-x+\sqrt{x}-1}\right):\left(1-\frac{\sqrt{x}}{x+1}\right)\)
\(=\left(\frac{x+1}{\left(\sqrt{x}-1\right)\left(x+1\right)}-\frac{2}{\left(\sqrt{x}-1\right)\left(x+1\right)}\right):\left(\frac{x+1}{x+1}-\frac{\sqrt{x}}{x+1}\right)\)
\(=\frac{x-1}{\left(\sqrt{x}-1\right)\left(x+1\right)}:\frac{x+1-\sqrt{x}}{x+1}\)
\(=\frac{x-1}{\left(\sqrt{x}-1\right)\left(x+1\right)}\cdot\frac{x+1}{x-\sqrt{x}+1}\)
\(=\frac{x-1}{\sqrt{x}-1}\cdot\frac{1}{x-\sqrt{x}+1}\)
\(=\frac{\sqrt{x}+1}{x-\sqrt{x}+1}\)