A rough way to "settle up" would be to just calculate the total shortfall ($25 * N payments) and give that in a lump sum. The only thing the lender would be out on is the accrued interest of those shortfalls, which may not be enough to make it worth the time and effort to calculate (and explain).
The exact way would be to create an amortization schedule in your favorite spreadsheet app, and for each month, calculate the accrued interest, which would be the principal balance after the previous payment times monthly interest rate (annual rate/12). Subtract that from the payment amount to calculate the amount applied to principal. Repeat that for each month up to the present. That will tell you how much principal is still due. From there you can either true up in one lump payment or re-amortize for the remainder of the original loan period.
The math is not hard, but just tedious, so a spreadsheet will allow you to set up one or two months, verify the math, and copy the formulas to the remaining months.
As I said, it may just be easier to true up the missed principal ($25 * N months) and don't sweat the accrued interest that was missed.
I took a $160K loan at 5% amortized over 30 years and changed the payment from $850 to $825. Over 2 years the amount of interest lost was only $29 (assuming you paid $600 to make up for the 24 payments of $25), so it's not enough to worry about calculating if it's not clear exactly how to calculate it.