\(a+b\ge a^2+b^2\ge\dfrac{1}{2}\left(a+b\right)^2\Rightarrow a+b\le2\)
\(\Rightarrow2\ge a+b\ge2\sqrt{ab}\Rightarrow ab\le1\)
Xét \(Q=\dfrac{a}{a+1}+\dfrac{b}{b+1}=\dfrac{a\left(b+1\right)+b\left(a+1\right)}{\left(a+1\right)\left(b+1\right)}=\dfrac{a+b+2ab}{\left(a+1\right)\left(b+1\right)}\)
\(Q=\dfrac{a+b+ab+ab}{\left(a+1\right)\left(b+1\right)}\le\dfrac{a+b+ab+1}{\left(a+1\right)\left(b+1\right)}=\dfrac{\left(a+1\right)\left(b+1\right)}{\left(a+1\right)\left(b+1\right)}=1\)
\(\Rightarrow P\le2020+1^{2021}=2021\)
Dấu "=" xảy ra khi \(a=b=1\)