Complex sentence: The first trip to run over the whole length of the line was in May 1862 with William Gladstone among the guests and by the end of 1862 work was complete at a total cost of £1.3 million.
Split into simpler sentences: The first trip to run over the whole length of the line was in May 1862 with William Gladstone among the guests. By the end of 1862 work was complete at a total cost of £1.3 million.