\(A=-\left(x^2-4x+4\right)+4=-\left(x-2\right)^2+4\le4\)
\(A_{max}=4\) khi \(x=2\)
Câu B đề có vấn đề
\(C=-\left(x^2+y^2+1+2xy-2x-2y\right)-\left(x^2-2x+1\right)+7\)
\(C=-\left(x+y-1\right)^2-\left(x-1\right)^2+7\le7\)
\(C_{max}=7\) khi \(\left\{{}\begin{matrix}x=1\\y=0\end{matrix}\right.\)