Riddler tied the people to the track and set the trolley going. He's the murderer in this situation. If anyone did die, Batman would add it to the charges against Riddler. Part of his whole thing is he just brings criminals in for the existing justice system to handle.
In the comic 'Joker', Joker is going around killing other top crime figures and Batman just lets him until Batman decides to come in and bust his ass.