Complex sentence: William's grandson, Elector Frederick William, sided with the Austrian Empire in the Austro-Prussian War, and after the Prussian victory his lands were annexed by Prussia in 1866.
Split into simpler sentences: William's grandson, Elector Frederick William, sided with the Austrian Empire in the Austro-Prussian War. Following the Prussian victory his lands were annexed by Prussia in 1866.