I have a problem to solve and I got stack. The question is: Having a vehicle that weighs **m** that can move at variable speed but with maximum acceleration of **a1** and minimum deceleration of **a2** calculate the minimum time to cover distance **L**. 

I need some pointers or a link, please and thank you.