Polynomials with real coefficients could have complex solutions, but they must occur in pairs, so that the complex part of their product is cancelled out. The conjugate of -1+2i is -1-2i. The roots are 4, -2, -1+2i, -1-2i. Given these four solutions, the polynomial with minimum degree is (x-4)(x+2)(x+1-2i)(x+1+2i)=(x^2-2x-8)(x^2+5)=x^4-2x^3-3x^2-10x-40.