Complex sentence: Several Class B locomotives were sold to mines and other industries by the CFM, CSAR and SAR, when they began to be retired from government railways service, and some remained in industrial service well into the twentieth century.
Split into simpler sentences: Several Class B locomotives were sold to mines and other industries by the CFM, CSAR and SAR when they began to be withdrawn from government railways service. Some remained in industrial service well into the twentieth century.