Complex sentence: Heinlein and his second wife divorced in 1947, and the following year he married Virginia "Ginny" Gerstenfeld, to whom he would remain married until his death forty years later.
Split into simpler sentences: Heinlein and his second wife divorced in 1947. They would remain married until his death forty years later.