Match the steps in long division with their counterparts in integration by long division:
Divide leading terms ↔️ Divide numerator by denominator
Multiply and subtract ↔️ Multiply result by denominator, subtract
Bring down next term ↔️ Integrate the result from step 2
Repeat steps 1-3 ↔️ Repeat steps 1-3