Complex sentence: He was appointed deputy attorney general in 1847 and served until 1850; afterwards serving as district attorney from 1850 to 1854.
Split into simpler sentences: He was appointed deputy attorney general in 1847 and served until 1850. He served as district attorney from 1850 to 1854.