Subway Interview Question

The math on the written portion.