We shall consider the relative motion of the bodies from the viewpoint of the first body. Then at the initial moment, the first body is at rest (it can be at rest at the subsequent instants as well), while the second body moves towards it at a velocity v1 + v2. Its acceleration is constant, equal in magnitude to a1 + a2, and is directed against the initial velocity. The condition that the bodies meet indicates that the distance over which the velocity of the second body vanishes must be longer than the separation between the bodies at the beginning of motion; hence we obtain