Three persons A, B, C can be arranged in a queue in six different ways i.e., ABC, CBA, BAC, CAB, BCA, ACB. But since there are only 3 persons ahead of C, so C should be in front of the queue. Thus, there are only two possible arrangements i.e., CBA and CAB. We may consider the two cases as under :
3 8 5 21
Case I : ← C ↔ B ↔ A →
clearly, number of persons in the queue = (3 + 1 + 8 + 1 + 5 + 1 + 21) = 40.
3 5
Case II : ← C A ↔ B
Number of persons between A and C = (8 - 6) = 2.
Clearly, number of persons in the queue = (3 + 1 + 2 + 1 + 21) = 28.
Now, 28 < 40. So, 28 is the minimum number of perosn in the queue.