\(M=\left(\frac{1}{a-\sqrt{a}}+\frac{1}{\sqrt{a}-1}\right):\frac{\sqrt{a}+1}{a-2\sqrt{a}+1}\) \(=\frac{1+\sqrt{a}}{\sqrt{a}\left(\sqrt{a}-1\right)}\cdot\frac{\left(\sqrt{a}-1\right)^2}{\sqrt{a}+1}\) \(=\frac{\sqrt{a}-1}{\sqrt{a}}\)
\(M=\left(\frac{1}{a-\sqrt{a}}+\frac{1}{\sqrt{a}-1}\right):\frac{\sqrt{a}+1}{a-2\sqrt{a}+1}\)
=\(\left[\frac{1}{\sqrt{a}\left(\sqrt{a}-1\right)}+\frac{\sqrt{a}}{\sqrt{a}\left(\sqrt{a}-1\right)}\right]:\frac{\sqrt{a}+1}{\left(\sqrt{a}-1\right)^2}\)
=\(\frac{1+\sqrt{a}}{\sqrt{a}\left(\sqrt{a}-1\right)}.\frac{\left(\sqrt{a}-1\right)^2}{\sqrt{a}+1}\)
=\(\frac{\sqrt{a}-1}{\sqrt{a}}\)
=\(\frac{\sqrt{a}\left(\sqrt{a}-1\right)}{a}\)