\(P=\left(\dfrac{x-\sqrt{x}+2}{x-\sqrt{x}-2}-\dfrac{x}{x-2\sqrt{x}}\right):\dfrac{1-\sqrt{x}}{2-\sqrt{x}}\)
\(=\dfrac{\left(x-2\sqrt{x}\right)\left(x-\sqrt{x}+2\right)-x\cdot\left(x-\sqrt{x}-2\right)}{\left(x-\sqrt{x}-2\right)\left(x-2\sqrt{x}\right)}\cdot\dfrac{2-\sqrt{x}}{1-\sqrt{x}}\)
\(=\dfrac{x^2-x\sqrt{x}+2x-2x\sqrt{x}+2x-4\sqrt{x}-x^2+x\sqrt{x}+2x}{\left(x+\sqrt{x}-2\sqrt{x}-2\right)\sqrt{x}\cdot\left(\sqrt{x}-2\right)}\cdot\dfrac{-\left(\sqrt{x}-2\right)}{-\left(\sqrt{x}-1\right)}\)
\(=\dfrac{6x-2x\sqrt{x}-4\sqrt{x}}{\left(\sqrt{x}\cdot\left(\sqrt{x}+1\right)-2\left(\sqrt{x}+1\right)\right)\sqrt{x}}\cdot\dfrac{-1}{-\left(\sqrt{x}-1\right)}\)
\(=\dfrac{2\sqrt{x}\cdot\left(3\sqrt{x}-x-2\right)}{\left(\sqrt{x}-2\right)\left(\sqrt{x}+1\right)\sqrt{x}}\cdot\dfrac{-1}{-\left(\sqrt{x}-1\right)}\)
\(=\dfrac{2\sqrt{x}\cdot\left(-x+3\sqrt{x}-2\right)}{\left(\sqrt{x}-2\right)\left(\sqrt{x}+1\right)\sqrt{x}}\cdot\dfrac{-1}{-\left(\sqrt{x}-1\right)}\)
\(=\dfrac{2\sqrt{x}\cdot\left(-x+2\sqrt{x}+\sqrt{x}-2\right)}{\left(\sqrt{x}-2\right)\left(\sqrt{x}+1\right)\sqrt{x}}\cdot\dfrac{-1}{-\left(\sqrt{x}-1\right)}\)
\(=\dfrac{2\sqrt{x}\cdot\left(-\sqrt{x}+1\right)\cdot\left(\sqrt{x}-2\right)}{\left(\sqrt{x}-2\right)\left(\sqrt{x}+1\right)\sqrt{x}}\cdot\dfrac{-1}{-\left(\sqrt{x}-1\right)}\)
\(=\dfrac{2\sqrt{x}\cdot\left(-\sqrt{x}+1\right)}{\left(\sqrt{x}+1\right)\sqrt{x}}\cdot\dfrac{-1}{-\left(\sqrt{x}-1\right)}\)
\(=\dfrac{-2x+2\sqrt{x}}{\left(\sqrt{x}+1\right)\sqrt{x}}\cdot\dfrac{-1}{-\left(\sqrt{x}-1\right)}\)
\(=\dfrac{-2\sqrt{x}\cdot\left(\sqrt{x}-1\right)}{\left(\sqrt{x}+1\right)\sqrt{x}}\cdot\dfrac{-1}{-\left(\sqrt{x}-1\right)}\)
\(=\dfrac{-2\cdot\left(-1\right)}{\sqrt{x}+1}\cdot\left(-1\right)\)
\(=-\dfrac{2\cdot1}{\sqrt{x}+1}\)
\(=-\dfrac{2}{\sqrt{x}+1}\)