Do the grouping $x^{5}+x^{4}+x^{3}+2x^{2}+2x+2=\left(x^{5}+x^{4}+x^{3}\right)+\left(2x^{2}+2x+2\right)$, and factor out $x^{3}$ in the first and $2$ in the second group.
Factor out common term $x^{2}+x+1$ by using distributive property. The following polynomials are not factored since they do not have any rational roots: $x^{2}+x+1,x^{3}+2$.