Now time taken from A to B is 150/30 = 5 hrs.
Time taken from B to A is 150/50 = 3 hrs.
Total distance travelled = 150+150 = 300 km
Total time = 5+3 = 8 hrs.
Average speed = 300/8
= 37.5km/hr.
Why did we take the distance equal to the LCM of 30 and 50?
Ans: We did it because that would make our calculations very easy as we are getting the time in integer values 5 & 3 and not any point value which would increase the calculation time.