There is no single right or wrong anwer in divorce cases, since the courts (assuming you don't settle and resolve the divorce amicably among yourselves) look to multiple different factors (respective spousal incomes and contributions to the marriage; the total "package" of money and assets each spouse may get; etc.) in dividing assets. But what you describe is a reasonable way to do it: each person gets one home, and the one who doesn't get the more expensive home gets additional money or assets equal in value to half the homes' difference in price, to equal things out.