\(M=\frac{\left(\sqrt{2}+\sqrt{3}+2\right)+\left(\sqrt{6}+\sqrt{8}+2\right)}{\sqrt{2}+\sqrt{3}+\sqrt{4}}=\frac{\left(\sqrt{2}+\sqrt{3}+\sqrt{4}\right)+\sqrt{2}\left(\sqrt{3}+\sqrt{4}+\sqrt{2}\right)}{\sqrt{2}+\sqrt{3}+\sqrt{4}}\)
\(M=\frac{\left(\sqrt{2}+\sqrt{3}+\sqrt{4}\right)\left(1+\sqrt{2}\right)}{\sqrt{2}+\sqrt{3}+\sqrt{4}}=1+\sqrt{2}\)