OK, here's a bit more detail that involves the concept of annihilators. If we look at the homogeneous version of your DE, the characteristic equation is r2 - r -2 = 0, which can be factored into (r - 2)(r + 1) = 0.
Looking at the homogeneous equation in terms of derivative operators, it's not too hard to see that it can be written as (D2 - D -2)y = 0. This equation can be factored into (D - 2)(D + 1)y = 0. The D + 1 operator annihilates e-x or any constant multiple of it. In case you aren't following, (D + 1)e-x means d/dx(e-x + e-x), which is clearly equal to zero. Similarly, the operator D - 2 annihilates e2x.
When you have repeated roots in the characteristic equation, you have repeated annihilator factors. For example, if the homogeneous DE were y'' + 2y' + y = 0, the char. equation would be r2 + 2r + 1 = 0, or (r + 1)2 = 0.
The operator form of this DE would be (D + 1)2y = 0. One solution to this DE is e-x, and as it turns out, xe-x is another linearly independent solution. All solutions of this DE are of the form y = c1e-x + c2xe-x. The D + 1 operator annihilates e-x, and the (D + 1)2 operator annihilates e-x and xe-x.
If the DE were y''' + 3y'' + 3y' + y = 0, the characteristic equation would be (r + 1)3 = 0. Following the logic as before, three linearly independent solutions are e-x, xe-x, and x2e-x. The (D + 1)3 operator annihilates e-x, xe-x, and x2e-x.
OK, now back to your original nonhomogeneous problem: y'' - y' - 2y = -6xe-x. This can be rewritten as (D2 - D - 2)y = -6xe-x, or equivalently as (D - 2)(D + 1)y = -6xe-x.
My previous work shows that the (D + 1)2 operator annihilates xe-x, so we'll tack another couple of factors of (D + 1) to make the nonhomogeneous equation a homogeneous one.
(D - 2)(D + 1)3)y = (D + 1)2(-6xe-x) = 0.
For this homogeneous equation, the set of linearly independent solutions is {e2x, e-x, xe-x, x2e-x}.
The first two are the solutions to the original homogeneous equation; the last two are solutions to the new homogeneous equation, and should therefore be selected as particular solutions to your nonhomogeneous problem.