\(A=x^2+4y^2-2xy+4x-10y+2020.\)
\(=\left(x^2-2xy+y^2\right)+\left(3y^2-6y+3\right)+\left(4x-4y\right)+2017\)
\(=\left(x-y\right)^2+3\left(y-1\right)^2+4\left(x-y\right)+2017\)
\(=\left[\left(x-y\right)^2+4\left(x-y\right)+4\right]+3\left(y-1\right)^2+2013\)
\(=\left(x-y+2\right)^2+3\left(y-1\right)^2+2013\)
\(A_{min}=2013\Leftrightarrow\hept{\begin{cases}\left(x-y+2\right)^2=0\\\left(y-1\right)^2=0\end{cases}}\)
\(\Leftrightarrow\hept{\begin{cases}x-y+2=0\\y=1\end{cases}\Rightarrow\hept{\begin{cases}x=-1\\y=1\end{cases}}}\)
\(B=8x^2+y^2-4xy-12x+2y+30\)
\(=\left(4x^2-4xy+y^2\right)+\left(4x^2-8x+4\right)-\left(4x-2y\right)+26\)
\(=\left(2x-y\right)^2+4\left(x-1\right)^2-2\left(2x-y\right)+26\)
\(=\left[\left(2x-y\right)^2-2\left(2x-y\right)+1\right]+4\left(x-1\right)^2+25\)
\(=\left(2x-y-1\right)^2+4\left(x-1\right)^2+25\)
\(\Rightarrow B_{min}=25\)\(\Leftrightarrow\hept{\begin{cases}\left(2x-y-1\right)^2=0\\\left(x-1\right)^2=0\end{cases}}\)
\(\Leftrightarrow\hept{\begin{cases}2x-y-1=0\\x=1\end{cases}}\)\(\Leftrightarrow x=y=1\)