Two homes

My son separated from his wife. He took our a mortgage to cover the equity from his house that he gave his wife. (He did not have a prior mortgage). His wife used the cash to buy another house and take out a mortgage. They would like to file their tax jointly. How do they treat the houses?  Do they have to treat one as a second home?