Option (A) is correct.
Explanation: Cab P's fare has two rules, so we solve in two cases. Cab Q's fare is 60+15d throughout.
Case 1: 0<d≤5. Cab P charges Rs 100.
100<60+15d⟹15d>40⟹d>38
So in this case P is cheaper for 38<d≤5.
Case 2: d>5. Cab P charges 100+18(d−5)=18d+10.
18d+10<60+15d⟹3d<50⟹d<350
So in this case P is cheaper for 5<d<350.
Joining the two cases: (38,5]∪(5,350)=(38,350).
Check: at d=38 both fares are Rs 100, and at d=350 both are Rs 310, so the ends are excluded. At d=4, P costs Rs 100 and Q costs Rs 120.
Why the other options are wrong
- (B) (5,350) solves only Case 2. It misses trips between 38 km and 5 km: at d=4, P (Rs 100) is cheaper than Q (Rs 120).
- (C) (0,350) uses 18d+10 for every trip and ignores the flat fare. For a short trip P charges Rs 100: at d=1, Q costs only Rs 75.
- (D) This is the set where cab Q is strictly cheaper: the comparison was reversed.