Microsoft Interview Question

Petrol pump distance puzzle