You can have m < both walkers; like m=10, a=30, b=20 ; with distance k=400:
M meets A after 10 hours; drives A back for 5 hours : A now has 150 to go.
A takes 5 hours to travel this 150: so total of 10 + 5 + 5 = 20 hours.
Meanwhile, B happily travels the 400 distance in 20 hours; so Time simply k/b.
The time that A is on that slow Motorcycle: k(a - b) / [b(a + m)]