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