x^3+x^2+2x+2 factor by grouping so it ends up with two binomials.
$$\small{\text{Formula:} $\boxed{a+ax+x^2+x^3 = (1+x)(a+x^2)}\\\\$\text{Example: }$\\$a=2 \qquad 2+2x+x^2+x^3 = (1+x)(2+x^2) \\a=1 \qquad 1+1x+x^2+x^3 = (1+x)(1+x^2)$}$$
You have to play around with it a bit (or a lot) using trial-and-error trying different possibilities until it works.
Check your answer here: http://m.wolframalpha.com/input/?i=factorize+x%5E3%2Bx%5E2%2B2x%2B2&x=0&y=0
This factorization could be handy to remember. Thanks Heureka.