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