for the lighthouse with 5-second on and off:
at t=0, the light comes on (if it initially came on at t=1, 121 would be the correct answer)
It stays on for 5 seconds, i.e., until t=5
At t=5 it turns off
It says off for 5 seconds, i.e., from t=5 to t=10
At t=10 it turns on again.
Repeat 11 more times
At t=120, the twelfth dark period ends, by the light turning on.
At t=121, it will have been lit for 1 second already.
The least common multiple (LCM) of 6, 8, and 10 is 120.