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