\(x+y+4=0\Rightarrow\left\{{}\begin{matrix}y=-4-x\\x+y=-4\end{matrix}\right.\)
\(x^3+y^3=\left(x+y\right)^3-3xy\left(x+y\right)=\left(-4\right)^3-3xy.\left(-4\right)=12xy-64\)
\(\Rightarrow P=2\left(12xy-64\right)+3\left(x^2+y^2\right)+10x\)
\(=24xy+3x^2+3y^2+10x-128\)
\(=24x\left(-4-x\right)+3x^2+3\left(-4-x\right)^2+10x-128\)
\(=-18x^2-62x-80=-18\left(x+\dfrac{31}{18}\right)^2-\dfrac{479}{18}\le-\dfrac{479}{18}\)
\(P_{max}=-\dfrac{479}{18}\) khi \(\left(x;y\right)=\left(-\dfrac{31}{18};-\dfrac{41}{18}\right)\)