Post your attempts.
accelerate for time = t
cruise at 50 m/s (surely not at 50 km/s unless car is in orbit, check your typing for typos. Maybe 50 km / hour which is about 30 miles/hour ?)
cruise at 50 for time T
t + T = 40 min = 2,400 seconds
steady speed = 50 whatevers/whatever = 0 + a t
distance during acceleration = d = .5 a t^2
total distance = 40 dowhistles = d + D where D is distance at steady speed
so D = 50 T
40 = .5 a ^2 + 50 T