[tex]y''-3y'+y=x^2[/tex]
The corresponding homogeneous equation,
[tex]r^2-3r+1=0[/tex]
has two roots at [tex]r=\dfrac{3\pm\sqrt5}2[/tex], so that the characteristic solution is
[tex]y_c=C_1e^{(3+\sqrt5)/2\,x}+C_2e^{(3-\sqrt5)/2\,x}[/tex]
For the particular solution, assume one of the form
[tex]y_p=ax^2+bx+c[/tex]
[tex]\implies{y_p}'=2ax+b[/tex]
[tex]\implies{y_p}''=2a[/tex]
Substituting [tex]y_p[/tex] and its derivatives into the non-homogeneous ODE gives
[tex]2a-3(2ax+b)+(ax^2+bx+c)=x^2[/tex]
[tex]ax^2+(-6a+b)x+(2a-3b+c)=x^2[/tex]
[tex]\implies\begin{cases}a=1\\-6a+b=0\\2a-3b+c=0\end{cases}\implies a=1,b=6,c=16[/tex]
Then the general solution to the ODE is
[tex]\boxed{y(x)=C_1e^{(3+\sqrt5)/2\,x}+C_2e^{(3-\sqrt5)/2\,x}+x^2+6x+16}[/tex]