\(M=\left(1+\frac{1}{a}\right)^2+\left(1+\frac{1}{b}\right)^2\ge\frac{1}{2}\left(1+\frac{1}{a}+1+\frac{1}{b}\right)^2\)
\(M\ge\frac{1}{2}\left(2+\frac{1}{a}+\frac{1}{b}\right)^2\ge\frac{1}{2}\left(2+\frac{4}{a+b}\right)^2=\frac{1}{2}\left(2+\frac{4}{1}\right)^2=18\)
\(M_{min}=18\) khi \(a=b=\frac{1}{2}\)