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