\(A=-2\)
\(\Leftrightarrow5x^2+y^2+4xy-6x-2y=-2\)
\(\Leftrightarrow4x^2+x^2+y^2+4xy-4x-2x-2y+1+1=0\)
\(\Leftrightarrow\left(4x^2+4xy+y^2\right)-2\left(2x+y\right)+1+\left(x^2-2x+1\right)=0\)
\(\Leftrightarrow\left(2x+y\right)^2-2\left(2x+y\right)+1+\left(x-1\right)^2=0\)
\(\Leftrightarrow\left(2x+y-1\right)^2+\left(x-1\right)^2=0\)(1)
Mà \(\left(2x+y-1\right)^2+\left(x-1\right)^2\ge0\)nên (1) xảy ra
\(\Leftrightarrow\hept{\begin{cases}2x+y-1=0\\x-1=0\end{cases}}\Leftrightarrow\hept{\begin{cases}y=-1\\x=1\end{cases}}\)
\(\Rightarrow B=1^{2015}.\left(-1\right)^{2016}-1^{2016}.\left(-1\right)^{2017}+2014\)
\(=1+1+2014=2016\)