Complex sentence: Their use appears to have been restricted mainly to the coastal section of the railway and by July 1887 both of them were permanently out of service.
Split into simpler sentences: Their use appears to have been restricted mainly to the coastal section of the railway. By July 1887 both of them were permanently out of service.