Two home-building giants will merge to form one single company in an equity market capitalization deal worth $5.2 billion.