Selling this house and buying another like it isn't any part of a solution to your situation.
I can't exactly read through your text to see the underlying drivers of what brought you to this point (and don't need to; I'm just saying that you need to figure out what outcome you want).
If you want to more deeply separate your finances from your ex-wife, then by all means do the re-fi and buy-out.
If you want to more deeply separate your life from your ex-wife, in order to move on, that's going to be tough in your current situation, but will also be tough in any other situation as well, at least until your son leaves the home.
Renting the basement is somewhat separate decision from the above, unless you want to consider renting it to your ex, which sounds like a terrible idea for any number of reasons. In your mental math, I'd only count on half the income that you're counting on, to account for vacancies, additional utliities/repairs, etc. It's still money, but you can't model it as all income, no vacancy, no expenses.