Answer:
(a) d' = 22.73 m
(b) t = 13.187 s
Solution:
As per the question:
Initial speed of both the trains, u = 0 m/s
The distance between the front ends of the train, d = 50 m
Acceleration of the train on the left,
towards right
Acceleration of the train on the right,
towards left
Relative acceleration of the train ,

Now,
(a) Using the eqn (2) of motion, for the train on the left:



Now, the distance covered by the train on the left before passing the front end:


d' = 43.073 m
d' = 43.073 - 25 = 22.73 m
(b) Now,
Acceleration is constant at

Length of the trains, l = 150 m
Total distance, D = l + d = 150 + 50 = 200 m
Now, from eqn (2) of motion again:
200 = 0.t +

t = 13.187 s