Let \(P(x)=ax^2+bx+c\). You have derivatives \(P'(x)=2ax+b\) and \(P''(x)=2a\). Then
\(\begin{cases}P(2)=4a+2b+c=5\\P'(2)=4a+b=3\\P''(2)=2a=2\end{cases}\)
From the last equation, you have \(a=1\). Plug this into the second equation to get \(4+b=3\implies b=-1\). Plug these into the first to get \(4-2+c=5\implies c=3\).
So the polynomial is
\(P(x)=x^2-x+3\)