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