This works just like "long division".......we have
x^2 - 4x + 2
----------------------------
x+5 ) x^3 + x^2 - 18x + 2
x^3 + 5x^2
----------------------------
-4x^2 - 18x
-4x^2 - 20x
---------------
2x + 2
2x + 10
-----------
-8
So, there's our answer...... x^2 - 4x + 2 with a "remainder" of -8 /(x+5)
Note that if we can factor the numerator/denominator, this sometimes "cancels" terms and division might not be necessary at all, but that wasn't possible here.
This works just like "long division".......we have
x^2 - 4x + 2
----------------------------
x+5 ) x^3 + x^2 - 18x + 2
x^3 + 5x^2
----------------------------
-4x^2 - 18x
-4x^2 - 20x
---------------
2x + 2
2x + 10
-----------
-8
So, there's our answer...... x^2 - 4x + 2 with a "remainder" of -8 /(x+5)
Note that if we can factor the numerator/denominator, this sometimes "cancels" terms and division might not be necessary at all, but that wasn't possible here.