You can show this with a spreadsheet but it's really very simple and intuitive.

If you were to *owe another* $1000 today, would you prefer to owe it at 3% or 2%? Obviously, you should choose 2%, and pay $20 interest this year instead of $30.

If you could, would you *transfer* $1000 from a 3% loan to a 2% loan? Obviously, you should, it's the same proposition: you will owe that $1000 at 2% instead of at 3%.

So if you have $1000 cash and you are about *pay* it towards the 2% loan, now is your opportunity to transfer $1000 from the 3% loan to the 2% loan. Simply pay it towards the 3% loan instead. Comparing the two outcomes, what you did is transfer $1000 of 3% debt to $1000 of 2% debt. So, obviously you should.

None of this is in reference to the size of the loan. If the 2% loan is for $10,000 and the 3% loan is for $1,000,000, it doesn't matter: your decision when you have $1000 cash to make a payment is not a decision about $10,000 or $1,000,000, it's a decision about what interest rate you prefer on that $1000. It's the same proposition, with the same obvious answer: it's better to owe that $1000 at a lower interest rate, so pay off the higher one.