Given first polynomial is x2+3x+1
Second polynomial is 3x4+5x3-7x2+2x+2
Let us divide by 3x4+5x3-7x2+2x+2 by x2+3x+1 we get
p(x)=x4-3x2+4x+5
g(x)=x2+1-x
Here, dividend already in the standard form and the divisor is not in the standard form. it can be written as x2-x+1
So, we have
Since the remainder is , therefore 2+x+ is a factor of 3x4+5x3-7x2+2x+2