Formula for real estate buyout by one joint tenant of another (breakup)

If he were to force a sale, it would cost a certain amount off the top. He doesn’t get to avoid that by having me buy him out, because it exposes me to getting royally screwed. If I refinance for too much money so he can avoid costs, then 6 months down the line I am forced to sell because I can’t cover this big mortgage, I will have to eat those costs. Not fair.