The Office of Rail Regulation launched the prosecution following the incident in 2009 at the Whitemoor Rail Depot in Cambridgeshire.
Rail workers for both companies were carrying out repairs to a ballast regulator.
They were injured while using a hydraulic car jack to support an internal part of the ballast regulator.
The car jack, which should not have been in use, collapsed causing the ballast regulator to crush a Swietelsky Construction employee.
He received multiple facial fractures and continues to suffer the effects of a brain injury, while a Babcock Rail’s employee received injuries to his left eye and face.
Cambridge Crown Court heard that Babcock Rail and Swietelsky Construction had failed to carry out a specific risk assessment for replacing wear plates inside the ballast regulator.
It also found that no safety briefing or employee training for replacing the wear plates on the ballast machine had taken place.
This led to their employees deciding for themselves how to carry out work, and therefore exposed them to unnecessary risks and ultimately an incident that left the two workers hospitalised with serious head injuries.
Tom Wake, ORR’s Principal Inspector (South East), Railway Safety, said: “No employee should ever be set to work on dangerous machinery without appropriate support and training.
“In this instance, on 25 March 2009, Swietelsky Construction and Babcock Rail caused two rail workers to suffer serious head injuries at the Whitemoor Rail Depot because of poor planning and lack of employee training.
“The sentence passed today demonstrates how seriously the court considers these criminal breaches of health and safety law.
“ORR will keep pressing the industry to ensure the safety of those working on Britain’s railways, bringing criminal prosecutions where necessary.”
Swietelsky Construction was fined £24,000 and ordered to pay £13,000 in costs.
Babcock Rail was fined £36,000 and ordered to pay £16,728.17 in costs.