Two points A and B are 200M apart. Two lions are at the opposite ends when they start running towards the other point with speeds 18km/hr (lion at point A) and 36km/hr (Lion at point B) respectively. At the same time a deer starts running from point A towards point B with a speed 216/5 km/hr. The deer turns back whenever he encounters a lion in its path. Find the total distance covered by the deer until he's eaten.
I solved this by the trivial method. First calculate when and where the deer will meet the B lion. Then calculate the distance the A lion would've already covered in the same time. Then change the deer's direction and calculate when and where he'll meet the A lion. And so on
I was wondering if there's any other more systematic method (using modular arithmetic or anything else) of solving this. My method could be tedious for this question if the distances were larger or if the lions were slower. I think it'd be really cool if someone could model this with matrices.