It is given that A, B and C make 60, 30 and 40 pastries respectively in an hour.
=> In 30 minutes, they will make 30, 15 and 20 pastries respectively.
So, in one cycle of 1 hour 30 minutes where each works for 30 minutes, pastries made = 30 + 15 + 20 = 65
Now, in 2 cycles (3 hours), 130 pastries would be made.
In the next 30 minutes, A would make 30 pastries.
So, total time elapsed = 3 hours 30 minutes and pastries made = 130 + 30 = 160
In the next 30 minutes, B would make 15 pastries.
So, total time elapsed = 4 hours and pastries made = 160 + 15 = 175
In the next 15 minutes, C would make 10 pastries.
So, total time elapsed = 4 hours 15 minutes and pastries made = 175 + 10 = 185
Therefore, total time taken = 4 hours 15 minutes