Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
$\begingroup$u is the initial velocity, so for two objects to travel the same distance, with the same acceleration and in the same time frame, they both have to have the same initial velocity (or so I think)$\endgroup$
The initial velocities matters, but direction of acceleration would also effect the overall distanced traveled.
For example, objects (with the same initial velocities) accelerated in opposite directions could increase the velocity of one object and decrease the velocity of the other. Obviously their distanced traveled would be different.