\(P=2a+ab\left(2+c\right)\le2a+\dfrac{a}{4}\left(b+2+c\right)^2=2a+\dfrac{a}{4}\left(7-a\right)^2\)
\(P\le\dfrac{1}{4}\left(a^3-14a^2+57a-72\right)+18=18-\dfrac{1}{4}\left(8-a\right)\left(a-3\right)^2\le18\)
\(P_{max}=18\) khi \(\left(a;b;c\right)=\left(3;2;0\right)\)