Trolley Interview Question

Solve math problem and explain your though process while solving it.