Without knowing the amount and the years left, I can't say for sure, but you're likely on the right path by paying off the higher interest rate debt first.
Some people advocate for the Debt Avalanche payment structure (IE what I/you suggested) and some believe in what they call the snowball approach (IE paying off the smaller principal debt first to get one loan out of the way).
Simply put, paying off the higher interest rate loan, will save you money in the long run. However, some people like the psychological benefit of paying off a loan. If that is you, and it will keep you on track, then pay off whichever has the smaller principal balance first (not my suggestion).
Read here:
https://www.investopedia.com/articl...avalanche-vs-debt-snowball-which-best-you.asp
I personally would input the amounts into this and decide from there:
https://studentloanhero.com/calculators/student-loan-prepayment-calculator/
But without knowing anything, again, I'd say debt avalanche is better because (outside of the psychological benefits) it will pay off your total loans faster.