\(A=x^2+y^2+4-2xy+4x-4y+x^2-2x+1+4\)
\(A=\left(x-y+2\right)^2+\left(x-1\right)^2+4\ge4\)
\(A_{min}=4\) khi \(\left\{{}\begin{matrix}x-1=0\\x-y+2=0\end{matrix}\right.\) \(\Rightarrow\left\{{}\begin{matrix}x=1\\y=3\end{matrix}\right.\)
\(B=21-\left(x^2+8x+16\right)=21-\left(x+4\right)^2\le21\)
\(B_{max}=21\) khi \(x=-4\)
\(C=5-\left(x^2-4x+4\right)=5-\left(x-2\right)^2\le5\)
\(C_{max}=5\) khi \(x=2\)