This page explains the procedure quite well.
http://www.sosmath.com/algebra/factor/fac01/fac01.html
The example about 2/3 of the way down the site matches your question quite nicely.
divide by long division.
divide x^3 + 4x^2 - 3x - 12 by x^2 - 3
2 answers
you get x+4