\(A=-2\left(x-\frac{5}{4}\right)^2-\frac{39}{8}\le-\frac{39}{8}\)
\(A_{max}=-\frac{39}{8}\) khi \(x=\frac{5}{4}\)
\(B=-\frac{1}{2}\left[2x^2+2y^2-2xy-4x-4y\right]\)
\(B=-\frac{1}{2}\left[\left(x-y\right)^2+\left(x-2\right)^2+\left(y-2\right)^2-8\right]\)
\(B=-\frac{1}{2}\left[\left(x-y\right)^2+\left(x-2\right)^2+\left(y-2\right)^2\right]+4\le4\)
\(B_{max}=4\) khi \(x=y=2\)