Physics
posted by Waqas .
When a high speed passenger train travelling at 161km/h rounds a bend,the engineer is shocked to see that a locomtive has improperly entered onto track from a siding and is a distance D=676m ahead.The locomotive is moving at 29km/h. The engineer of the high speed train immediately applies the brakes. What must be the magnitude of the resulting constant decelaration if a collision is to be just avoided?(note: both the train and the locomotive are moving in the same direction)

If the trains barely avoid collision during a decelerating period T, they both end up at the same place at that time. Let's measure X from the position of the faster train when deceleration starts. Let X1 be the distance travelled by the faster train, and X2 bew the distance travelled by the other train, at time T.
X1 = 161 T  (1/2) a T^2
X2 = 676 + 29 T
Set X1 = X2 and you still have two unknowns, T and a. You have one other equation to work with:
a T = 161
which says that the velocity of the faster train becomes zero at t = T.
Eliminate the variable T and solve for a 
Thanks for the reply. But, i don't quite get where do u get X2 equation from.