The characteristic equation for y"-2y'-3y = x2 is (D2-2D-3)y = x2 or (D-3)(D+1) = x2
So the general solution is y = Ae-x + Be3x + yp
The particular solution can be found in a number of ways including repeated integrating factor for 2 first order equations, using Laplace Transforms, or other short methods described in textbooks etc,
Keep in mind the particular solution is the only solution if y(0) = y'(0) = 0
I used Laplace Transforms but then you have to deduce partial fractions but it can be done. In this case the particular solution yp = (-14/27) + (4/9)x + (-1/3)x2 + (1/2)e-x + (1/54)e3x