a: \(P=\dfrac{-1+2\sqrt{x}-x+x-2\sqrt{x}+\sqrt{x}+2}{\left(\sqrt{x}-1\right)\left(\sqrt{x}-2\right)}:\dfrac{2x+1-\sqrt{x}}{\sqrt{x}\left(\sqrt{x}-2\right)}\)
\(=\dfrac{\sqrt{x}+1}{\left(\sqrt{x}-1\right)}\cdot\dfrac{\sqrt{x}}{\sqrt{x}+1}=\dfrac{\sqrt{x}}{\sqrt{x}-1}\)
b: Thay \(x=6-2\sqrt{5}\) vào P, ta được:
\(P=\dfrac{\sqrt{5}-1}{\sqrt{5}-2}=3+\sqrt{5}\)