\(a+b=\left(a+b\right)^2-3ab\ge\left(a+b\right)^2-\frac{3}{4}\left(a+b\right)^2=\frac{1}{4}\left(a+b\right)^2\)
\(\Leftrightarrow\left(a+b\right)^2-4\left(a+b\right)\le0\)
\(\Leftrightarrow\left(a+b\right)\left(a+b-4\right)\le0\)
\(\Rightarrow0\le a+b\le4\)
\(\Rightarrow P_{min}=0\) khi \(a=b=0\)
\(P_{max}=505.4=2020\) khi \(a=b=2\)