Explanation:
the last common multiple (LCM) of both frequencies tells us the interval until both flash at the same time again.
the method to find the LCM of integers is to split them into their prime factors and then create the product of all the prime factors, where a prime factors they have in common is used only once.
like e.g.
15 and 27
15 = 3×5
27 = 3×3×3
so, the LCM is not just 15×27, as they have one prime factor (3) in common. it is 3×3×3×5 = 135
now in our case, we have 3 and 3 1/2 our 3.5. they are not integers, but we can easily convert them into integers, do the LCM calculation, and then reverse the result by the inverse of the original conversion.
we multiply them by 10 in our case here, and we get
30 and 35.
30 = 2×3×5
35 = 5×7
the LCM = 2×3×5×7 = 210
the inverse of our conversion is now to divide by 10, which gives us
210/10 = 21 as the LCM for 3 and 3.5.
so, they flash at the same time every 21 minutes.
starting at 12pm, 2pm is 2 hours or 120 minutes away.
120/21 = 5.714285714...
so, until 2pm we have finished 5 such cycles, and we are in the middle of the 6th cycle.
the 6th cycle will be fished after
21×6 = 126 minutes
12pm + 126 minutes = 2:06 pm
they will flash together the first time after 2pm at 2:06pm.