Each year the balance grows by that year's interest, then the payment comes off. Carry the new balance into the next year.
Stopping at the balance owed at the start of the last year and forgetting that year's interest
Write the rate as a fraction (12.5% = 1/8) and repeat: multiply by (1 + rate), subtract the payment.