Jessica divided x^4+3x^3-9x^2+6 by a polynomial. Her answer was x^3-3x^2+x-5 with a remainder of 31. What polynomial did Jessica divide by?