\(A=-x^2-y^2+xy+2x+2y\)
\(\Leftrightarrow A=-\left(x^2-xy+\frac{y^2}{4}\right)+\left(2x-y\right)-1-\frac{3}{4}y^2+3y-3+\left(1+3\right)\)
\(\Leftrightarrow A=-\left[\left(x-\frac{y}{2}\right)^2-2\left(x-\frac{y}{2}\right)+1\right]-\frac{3}{4}\left(y^2-4y+4\right)+4\)
\(\Leftrightarrow A=-\left(x-\frac{y}{2}-1\right)^2-\frac{3}{4}\left(y-2\right)^2+4\le4\forall x,y\)
Dấu "=" xảy ra khi \(\hept{\begin{cases}x-\frac{y}{2}-1=0\\y-2=0\end{cases}\Leftrightarrow\hept{\begin{cases}x=2\\y=2\end{cases}}}\)
Vậy \(Max_A=\frac{4}{3}\) khi \(x=y=2\)