\(4=2^x+2^y\ge2\sqrt{2^{x+y}}=2.2^{\frac{x+y}{2}}\)
\(\Rightarrow\frac{x+y}{2}\le1\Rightarrow x+y\le2\Rightarrow xy\le1\)
\(P=4x^2y^2+2x^3+2y^3+10xy\)
\(P=4x^2y^2+10xy+2\left(x+y\right)^3-6xy\left(x+y\right)\)
\(P=4x^2y^2-2xy+16=2\left(xy-1\right)\left(2xy+1\right)+18\)
Do \(xy\le1\Rightarrow2\left(xy-1\right)\left(2xy+1\right)\le0\Rightarrow P\le18\)
\(\Rightarrow P_{max}=18\) khi \(x=y=1\)