All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
In principle, the train driver in this case is not liable to pay Diyah (blood money) or any other compensation as long as the accident was inevitable (he could not have avoided it). One of the well-established Fiqh principles is that there is no liability in what is unavoidable.
Also, whoever does what is permissible without negligence or transgression and harm or damage resulted from that, then he is not liable for it.
Allaah Knows best.