In the figure, a red car and a green car, identical except for the color, move toward each other in adjacent lanes and parallel to an x axis. At time t=0, the red car is at x_r=0 and the green car is at x_g=220 m. If the red car has a constant velocity of 20 km/h, the cars pass each other at x=44.5 m, and if it has a constant velocity of 40 km/h, they pass each other at x=76.6 m.What are (a) the initial velocity and (b) the constant acceleration of the green car?

Solution:
Let d be the distance between the two cars at t=0, which is 220m, and the velocity, v_1 be 20km/h which in m/s is 5.55m/s. Let v_2 be the 40km/h which is 11.1m/s.
To solve this problem, we will simultaneously solve two equations at once to find the initial velocity and the acceleration.
The two equations we will use are:
d-x_1=v_0t_1+\frac{1}{2}at_1^2 where t_1=\frac{x_1}{v_1}
and
d-x_2=v_0t_2+\frac{1}{2}at_2^2 where t_2=\frac{x_2}{v_2}
Subsisting x_1=44.5m and x_2=76.7m and our other given values leads us to the following results:
v_0=-13.9 m/s and in km/h we have -50km/h.
and the acceleration is, a=-2.0m/s^2.
As both values are negative, it tells us that it is along the -x direction.
This question can be found in Fundamentals of Physics, 10th edition, chapter 2, question 34.