Two trains, A and B, travel in the same direction on the same
set of tracks. A starts at rest at position d, and B starts with
velocity v0 at the origin. A accelerates with acceleration a, and B
decelerates with acceleration –a. What is the maximum value of v0
(in terms of d and a) for which the trains don’t collide? Make a
rough sketch of x vs. t for both trains in the case where they
barely collide.