Artificial intelligent assistant

Uniform acceleration Two stunt drivers drive their cars along a straight horizontal road. The first car is travelling at 30 m/s and is followed by the second car, 16 m behind it, both cars are travelling with equal speeds. At an instant the driver of the first car applies the brakes decelerating at 3 m/s/s. Two seconds later , the second car brakes and decelerates at 4 m/s/s. Can someone plz try the questions and verify the answers I got The time it takes the cars to collide?. 4sec The speed of the cars at the instant of impact? car1: is 18m/s. car2: is 22m/s If however, after the first car has decelerated for those initial two seconds.both cars continue at their then respective speeds. what is the least uniform retardation that must be applied to the faster car so as to avoid collision? And I couldn't really do this one so can someone please tell me how to set it up and start it.

time $t$ is measured in seconds starting when the first car brakes. and the distance is also measured with the origin where the second car is at the the breake was applied.

$$x_f = 54 + 24(t-2), x_s = 44 + 30(t-2) - \frac{1}{2}a(t-2)^2$$ where $x_f, x_s$ represent the position at $t$ if the first and second car respectively.

setting them equal, the quadratic equation for $$a(t-2)^2 - 12(t-2) + 20 = 0.$$ we need the discriminant equals zero for a double root. which gives $a = \dfrac{9}{5}.$

so the least uniform retardation needed to avoid collision is $\dfrac95.$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 7783aef8be37a0568a45c9e7dc791cd5