Kinetic energy = (1/2) (mass) (speed²)
The mass of each car is 7,650 kg.
The speed of each car is (95 km/hr) x (1,000m/km) x (1 hr/3,600 sec)
= 26.3889 meters/sec
Kinetic energy of each car = (1/2) (7,650) (26.3889)² = 2,663,628 joules
Total kinetic energy of both cars = double that number = 5,327,256 joules
That's the total energy dissipated in the crash. We can't tell how much of it is thermal energy, and how much of it is dissipated in other ways, like tearing up the rails, bending and twisting the cars and ripping them to shreds, and sending pieces flying in every direction.