Question regarding two bodies where one has constant acceleration and the other hs constant velocity

Say we have two cars, Car A and Car B. Car A is 25 meters ahead and has a constant velocity. Car B has the exact same velocity at the moment of observation, but also has a constant positive acceleration.

If I want to calculate how long it takes for Car B to overtake Car A, wouldn't it be the same as calculating how long it takes car B to go 25 meters from standing still?

I know how to calculate it if this is correct, I just need to know if it is.