To find the answer, we have to find the LCM of 25 and 40.
To get LCM, we
Write each number as prime factors
take the prime factor that occurs greatest number of time
take the product of those
Thus,
25 = 5 * 5
40 = 2 * 2 * 2 * 5
2 occurs 3 times and 5 occurs 2 times (greatest).
hence,
LCM(25, 40) = 2 * 2 * 2 * 5 * 5 = 200
So,
200 mins will pass before the two buses meet