I see. The other equation is solved in the same way as the example before. In German we also say "partikuläre Lösung", which just is a synonymon for "special solution".
So for a linear differential equation you get the general solution always as the sum of a special solution of the inhomogeneous equation and the general solution of the homogeneous one.
The solutions of the homogeneous equation build a vector space of functions with the dimension given by the order of the linear differential equation. Thus for a 2nd-order equation you need to linearly independent solutions.
So let's solve also this example. I guess the correct equation is
y''-3 y' + 2y=2 \exp x,
because you said it's a 2nd order ODE.
Start with the homogeneous equation. Since it's an equation with constant coefficients we make the standard ansatz (which ansatz to use you have to learn by doing a lot of examples):
y(x)=C \exp(\lambda x).
Putting this into the homogeneous equation gives after some algebra
\lambda^2-3 \lambda + 2 =0.
The two solutions of this equation are
\lambda_{1,2}=\frac{3}{2} \pm \sqrt{\frac{9}{4}-1}=\frac{3}{2} \pm \frac{1}{2},
i.e.,
\lambda_1=2, \quad \lambda_2=1.
These are two different roots, and thus the ansatz gives two linearely independent solutions. The general solution of the homogeneous equation thus is
y(x)=C_1 \exp(2 x)+C_2 \exp x.
Now we need a special solution of the inhomogeneous equation.
Here we make the ansatz
y(x)=z(x) \exp x,
because the right-hand side is proportional to \exp x, but since this is a solution of the homogeneous equation, you cannot simply make this ansatz. So we introduce an additional unknown function as a factor ("variation of the constant"). Plugging this into the inhomogeneous equation gives after some algebra
z''(x)-z'(x)=2,
and this was the equation we solved before. Again we only need one solution, which is
z(x)=-2x,
as I've shown in the previous posting.
So finally the general solution of the inhomogeneous equation is
y(x)=-2x \exp x + C_1 \exp x+C_2 \exp(2 x).
Now, after I've solved two examples for you, I recommend to post further questions on such problems to the homework section, where you don't get simply the solution but some guidance towards finding it yourself, which is much better to learn the techniques!