12) C

Total time taken by first group = 54 x 20 = 1080s
We know number of people in second group = ‘P’
Mean time of second group = ‘T’
Total number of people = 20 + P
Total time taken by second group = T x P
Total time taken by both groups = 1080 + (T x P)

In order to get total mean time (56), we need to divide total amount of time by total number of people.

56 = (1080 + TP) ÷ (20 + P)
56 (20 + P) = 1080 + TP
1120 + 56P = 1080 + TP
1120 – 1080 = TP – 56P
40 = P (T – 56)
P = 40 / (T – 56)

Hence, the answer is C.