${3x^4 + 5x^3 – 7x^2 + 2x +2}$
${x^2 + 3x + 1}$
$3x^2$
$-4x$
$+2$
${3x^4 + 9x^3+3x^2}$
($-$)
($-$) ($-$)  
$-4x^3-10x^2 + 2x +2$
$-4x^3 -12x^2 -4x$
($+$)
 ($+$) ($+$)  
${2x^2}$ ${+6x}$ ${+2}$
${2x^2}$ ${+6x}$ ${+2}$
($-$)($-$)($-$)
0
Therefore:${3x^4 + 5x^3 – 7x^2 + 2x +2}$ = $(x^2 + 3x + 1)(3x^2-4x+2) + 0 $
Since the remainder is zero, hence first polynomial is a factor of second polynomial.