Check whether the first polynomial is a factor of the second polynomial by dividing second polynomial by the first polynomial.
x2+3x+1,3x4+5x3−7x2+2x+2
x2+3x+1 is a factor of 3x4+5x3−7x2+2x+2
Since, the remainder is zero, so x2+3x+1 is factor of 3x4+5x3−7x2+2x+2.
Thus, 3x4+5x3−7x2+2x+2x2+3x+1=3x2−4x+2