\(z^2=xy-16=\left(8-y\right)y-16=-y^2+8y-16\\ \Leftrightarrow z^2+\left(y-4\right)^2=0\Leftrightarrow\left\{{}\begin{matrix}z=0\\y=4\end{matrix}\right.\Leftrightarrow\left\{{}\begin{matrix}z=0\\x=8-4=4\end{matrix}\right.\\ \Leftrightarrow P=x+z=0+4=4\)