In addition to the "method of undetermined coefficients", which only works when the "right-hand side" is one of the types of function we expect as solution to a homogeneous equation with constant coefficients (polynomials or exponentials or sine and cosine and combinations of those) and is more complicated if the "right-hand side" **is** a solution to the homogeneous equation, we can use "variation of parameters".

Having determined that the general solution to the associated homogeneous equation is \(\displaystyle y_h(t)= Ce^{-t}+ De^{2t}\), we look for a solution to the entire equation of the form \(\displaystyle y_p(t)= u(t)e^{-t}+ v(t)e^{2t}\) where u and v are some functions of t. It's easy to see that, whatever the true solution is, we can always find such functions - in fact there are many such solutions. Differentiating, \(\displaystyle y'_p(t)= u'(t)e^{-t}- u(t)e^{-t}+ v'(t)e^{2t}+ 2v(t)e^{2t}\). Because there are many such solutions, we can "narrow the search", as well as simplify the equation, by requiring that \(\displaystyle u'(t)e^{-t}+ v'(t)e^{2t}= 0\). Then we have \(\displaystyle y'_p(t)= -u(t)e^{-t}+ 2v(t)e^{2t}\). Differentiating again, \(\displaystyle y''_p(t)= -u'(t)e^{-t}+ u(t)e^{-t}+ 2v'(t)e^{2t}+ 5v(t)e^{2t}\). Putting those into \(\displaystyle y''- y'- 2y= 3e^{-t}\), everything that does NOT involve u' or v' cancels (because \(\displaystyle e^{-t}\) and \(\displaystyle e^{2t}\) satisfy the associated homogeneous equation) so that we have \(\displaystyle -u'e^{-t}+ 2v'e^{2t}= 3e^{-t}\).

So we have the two equations, \(\displaystyle u'e^{-t}+ v'e^{2t}= 0\) and \(\displaystyle -u'e^{-t}+ 2v'e^{2t}= 3e^{-t}\) that we can solve for u' and v'. Simply adding those two equations eliminates u': \(\displaystyle 3v'e^{2t}= 3e^{-t}\) so \(\displaystyle v'= e^{-3t}\) and then \(\displaystyle v(t)= -\frac{1}{3}e^{-3t}\) (Since I am only seeking one solution, I can ignore the constant of integration). Since \(\displaystyle v'(t)= e^{-3t}\), \(\displaystyle u'e^{-t}+ v'e^{2t}= u'e^{-t}+ e^{-t}= 0\). So \(\displaystyle u'e^{-t}= -e^{-t}\) and \(\displaystyle u'(t)= -1\) so that \(\displaystyle u(t)= t\) (**That's** where that "t" multiplying \(\displaystyle e^{-t}\) in topsquark's post came from!). So \(\displaystyle y_p(t)= u(t)e^{-t}+ v(t)e^{2t}= te^{-t}-\frac{1}{3} e^{-3t}e^{2t}= te^{-t}- \frac{1}{3}e^{-t}\). That last \(\displaystyle -\frac{1}{3}e^{-t}\) can be absorbed into the "\(\displaystyle Ce^{-t}\)" part of the homogeneous solution giving \(\displaystyle y(t)= Ce^{-t}+ De^{2t}+ te^{-t}\) as the general solution to the entire equation.