\(x^2+2xy+6x+6y+2y^2+8=0\\ \Leftrightarrow\left(x+y\right)^2+6\left(x+y\right)+y^2=-8\)
Ta có \(y^2\ge0\Leftrightarrow\left(x+y\right)^2+6\left(x+y\right)\le-8\)
\(\Leftrightarrow\left(x+y\right)^2+6\left(x+y\right)+9\le1\\ \Leftrightarrow\left(x+y+3\right)^2\le1\\ \Leftrightarrow\left|x+y+3\right|\le1\\ \Leftrightarrow-1\le x+y+3\le1\\ \Leftrightarrow2012\le B\le2014\)
\(B_{min}=2012\Leftrightarrow\left\{{}\begin{matrix}x+y+2016=2012\\y=0\end{matrix}\right.\Leftrightarrow\left\{{}\begin{matrix}x=-4\\y=0\end{matrix}\right.\)
\(B_{max}=2014\Leftrightarrow\left\{{}\begin{matrix}x+y+2016=2014\\y=0\end{matrix}\right.\Leftrightarrow\left\{{}\begin{matrix}x=-2\\y=0\end{matrix}\right.\)