\(P=\left(\dfrac{x-2+\sqrt{x}}{\left(\sqrt{x}+2\right)\left(\sqrt{x}\right)}\right)\cdot\dfrac{\sqrt{x}+1}{\sqrt{x}-1}\)
\(=\dfrac{\left(\sqrt{x}+2\right)\left(\sqrt{x}-1\right)}{\left(\sqrt{x}+2\right)\left(\sqrt{x}-1\right)}\cdot\dfrac{\sqrt{x}+1}{\sqrt{x}}=\dfrac{\sqrt{x}+1}{\sqrt{x}}\)