\(M=-x^2+12x+8=-\left(x-6\right)^2+44\le44\)
\(M_{max}=44\) khi \(x=6\)
\(N=a^2+9b^2+5a-6b=\left(a+\dfrac{5}{2}\right)^2+\left(3b-1\right)^2-\dfrac{41}{4}\ge-\dfrac{41}{4}\)
\(N_{min}=-\dfrac{41}{4}\) khi \(\left(a;b\right)=\left(-\dfrac{5}{2};\dfrac{1}{3}\right)\)
\(Q=3\left(a-5\right)^2-82\ge-82\)
\(Q_{min}=-82\) khi \(a=5\)