Complex sentence: In 1839 he was appointed, first a locomotive foreman, and in 1841 locomotive superintendent of the Birmingham and Derby Junction Railway; when that railway became one of the constituents of the Midland Railway, he took over the entire Railway as its locomotive superintendent.
Split into simpler sentences: In 1839 he was appointed, first a locomotive foreman, and then in 1841, locomotive superintendent of the Birmingham and Derby Junction Railway. When that railway became one of the constituents of the Midland Railway, he took over the entire Railway as its locomotive superintendent.