\(\left(a+b+c\right)^2=3ab+3bc+3ca\)
\(\Leftrightarrow a^2+b^2+c^2+2ab+2bc+2ca=3ab+3bc+3ca\)
\(\Leftrightarrow a^2+b^2+c^2-ab-bc-ca=0\)
\(\Leftrightarrow2a^2+2b^2+2c^2-2ab-2bc-2ca=0\)
\(\Leftrightarrow\left(a^2-2ab+b^2\right)+\left(b^2-2bc+c^2\right)+\left(c^2-2ca+a^2\right)=0\)
\(\Leftrightarrow\left(a-b\right)^2+\left(b-c\right)^2+\left(c-a\right)^2=0\)
\(\Leftrightarrow a=b=c\)
\(\Rightarrow P=\frac{a^{2020}+1}{a^{2020}+a^{2020}+a^{2020}+3}=\frac{a^{2020}+1}{3\left(a^{2020}+1\right)}=\frac{1}{3}\)