\(p=\left(\dfrac{\sqrt{x}-2}{x-1}-\dfrac{\sqrt{x}+2}{x+2\sqrt{x}+1}\right).\dfrac{\left(1-x\right)^2}{2}\)
\(\Leftrightarrow p=\left(\dfrac{\sqrt{x}-2}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)}-\dfrac{\sqrt{x}+2}{\left(\sqrt{x}+1\right)^2}\right).\dfrac{\left(1-x\right)^2}{2}\)
\(\Leftrightarrow p=\left(\dfrac{\left(\sqrt{x}-2\right)\left(\sqrt{x}+1\right)-\left(\sqrt{x}+2\right)\left(\sqrt{x}-1\right)}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)^2}\right).\dfrac{\left(1-x\right)^2}{2}\)
\(\Leftrightarrow p=\left(\dfrac{\left(-2\sqrt{x}\right)}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)^2}\right).\dfrac{\left(\sqrt{x}-1\right)^2\left(\sqrt{x}+1\right)^2}{2}\)
\(\Leftrightarrow p=-\sqrt{x}\left(\sqrt{x}-1\right)\)