If you pull the lever after the trolley's first set of wheels has passed the switch but before its last set of wheels has passed the switch then you'll derail the trolley and everyone lives.
The group of kids on a school trip in the trolley.
That's also another fun layer of metaphor to this whole thing. What's in the trolley? Nobody knows, and has to make decisions based on that incomplete information.