From debt ownership point of view, student loan should be the first choice. If you borrow from your mortgage, it cuts into your retirement planning and you are the debt owner.
From expense point of view, you are right. Cash-out refinance with fixed rate should be the choise since HELOC cost is not known. HELOC rates could go up when Federal Reserve changes the interest rate.