\(P=\left(x^2-2xy+y^2\right)+2\left(x-y\right)+1+\left(y^2-8y+16\right)-16\\ P=\left(x-y\right)^2+2\left(x-y\right)+1+\left(y-4\right)^2-16\\ P=\left(x-y+1\right)^2+\left(y-4\right)^2-16\ge-16\)
\(P_{min}=-16\Leftrightarrow\left\{{}\begin{matrix}x-y=-1\\y=4\end{matrix}\right.\Leftrightarrow\left\{{}\begin{matrix}x=3\\y=4\end{matrix}\right.\)
\(P=\left(x^2+y^2+1-2xy+2x-2y\right)+\left(y^2-8y+16\right)-16\\ =\left(x-y+1\right)^2+\left(y-4\right)^2-16\\ \ge-16\)
dấu = xảy ra khi và chỉ khi y=4,x=3