The buyer does not divide the money. A separation agreement, a stipulation, or a court order does. At a closing, the disbursements follow that paperwork and the title company’s payoff figures.
Tax treatment of a sale during a divorce is a question for a CPA or a tax attorney. This page does not estimate tax, and it does not assume an equal split.
If the spouses cannot agree, either side can ask the court to decide what happens to the house, including whether it will be sold. That is a court decision. It is not a buyer’s decision.
A mortgage statement is not a payoff quote. A useful comparison starts with the price, then subtracts the mortgage payoff, other required payoffs, sale costs, and credits. The attorneys and the title company confirm those figures.