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