Concept: The question tests on the area of LCM/HCF

Solution:

The red light flashes every 60/3 = 20 seconds and the green light flashes every 120 / 5 = 24 seconds

LCM of 20 and 24 = 120 second = 2 minutes

So after the first flash, they will flash together 60/2 = 30 times