Let's assume the new vehicle is $60,000, and ignore fees for simplicity since they will be the same:
You have a vehicle worth 25k with a 17k loan.
You also have 17k in cash.
Option 1: Pay off vehicle. Trade in vehicle with no loan. You get 25k for the trade, reducing the taxable sale price of the new vehicle to $35k. You have a new loan balance of $35,000 at your new interest rate.
Option 2: Trade in vehicle with loan. You get 25k for the trade, reducing the taxable sale price of the new vehicle to $35k. Dealer pays off the loan on the trade, and you put the 17k cash as additional down payment. You have a new loan balance of $35,000 at your new interest rate.
Option 3: Trade in vehicle with loan. You get 25k for the trade, reducing the taxable sale price of the new vehicle to $35k. Dealer pays off the loan on the trade, and you have a new loan balance of $52,000 at your new interest rate. You still have 17k in cash, but you financed more at the new rate.
Option 1 and 2 are the same net effect. There is no benefit for you to pay off the vehicle yourself first.