Yeongseon has finished shopping and walks to the checkout. There are two counters. L1 people stand in line at counter 1 and L2 people stand in line at counter 2. Each clerk serves the person at the front of the line, one person at a time.
The time a clerk needs for one person depends on the clerk's proficiency. A clerk with proficiency p finishes one person in exactly k seconds with probability p1(1−p1)k−1. The clerk at counter 1 has proficiency P1, the clerk at counter 2 has proficiency P2, and the times are independent across people.
Given L1, L2, P1, P2, compute the probability that standing in line at counter 1 is better than standing in line at counter 2. That is the probability that the last person in line 1 finishes before the last person in line 2. Finishing in the same second does not count as finishing first.