I saw this method in some random PDF and am intrigued of the exact method used. I can't find any page of this method on the web because I'm not sure what you'd call this method.
Here is the method:
For solving $$\int \frac{2x^4 + x^3}{x^2 + x - 2} \,\text{d}x$$ Observe that $$\begin{align*} 2x^4 + x^3 &= 2x^2 (x^2+x-2) - x^3+4x^2 \\ &= 2x^2 (x^2+x-2) - x(x^2+x-2) + 5x^2-2x \\ &= 2x^2 (x^2+x-2) - x(x^2+x-2) + 5(x^2+x-2) - 7x+10 \\ &= (2x^2-x+5)(x^2+x-2) - 7x+10 \end{align*}$$ and then $$ \int \frac{2x^4-x^3}{x^2+x-2} \,\text{d}x = \int (2x^2-x+5)\,\text{d}x + \int \frac{-7x+10}{x^2+x-2}\,\text{d}x$$