P(0)=1
=>\(a\cdot0^2+b\cdot0+c=1\)
=>c=1
=>\(P\left(x\right)=ax^2+bx+1\)
\(\left\{{}\begin{matrix}P\left(1\right)=3\\P\left(-1\right)=1\end{matrix}\right.\)
=>\(\left\{{}\begin{matrix}a\cdot1^2+b\cdot1+1=3\\a\cdot\left(-1\right)^2+b\cdot\left(-1\right)+1=1\end{matrix}\right.\)
=>\(\left\{{}\begin{matrix}a+b=2\\a-b=0\end{matrix}\right.\Leftrightarrow\left\{{}\begin{matrix}a=1\\b=1\end{matrix}\right.\)