Complex sentence: He was an unsuccessful candidate for reelection in 1840 to the Twenty-seventh Congress but came back to win a seat in the Twenty-eighth Congress (March 4,1843-March 3,1845).
Split into simpler sentences: He was an unsuccessful candidate for reelection in 1840 to the Twenty-seventh Congress. Duncan was elected to the Twenty-eighth Congress (March 4,1843-March 3,1845).