The particular quadratic solution to the ODE is found as follows:
[tex]x=at^2+bt+c[/tex]
[tex]x'=2at+b[/tex]
[tex](2at+b)+2(at^2+bt+c)=t^2+4t+7[/tex]
[tex]2at^2+(2a+2b)t+(b+2c)=t^2+4t+7[/tex]
[tex]\begin{cases}2a=1\\2(a+b)=4\\b+2c=7\end{cases}\implies a=\dfrac12,b=\dfrac32,c=\dfrac{11}4[/tex]
Note that there's also the fundamental solution to account for, which is obtained from the characteristic equation for the ODE:
[tex]x'+2x=0\implies r+2=0\implies r=-2[/tex]
so that [tex]x_c=Ce^{-2t}[/tex] is a characteristic solution to the ODE, and the general solution would be
[tex]x=Ce^{-2t}+\dfrac{t^2}2+\dfrac{3t}2+\dfrac{11}4[/tex]