Subway Interview Question

Some mathematical questions