Question

Expression for the total distance covered

A subway train starts from rest at a station and accelerates at a rate of a for t seconds. It runs at constant speed for 5t seconds and slows down at a rate of 2a until it stops at the next station. Find an expression for the total distance covered. x = ?