Given that both cars start from rest and have constant accelerations, we can use the kinematic equations to relate time and velocity. The relative speeds of the two cars will be proportional to the square root of their accelerations. Therefore, the velocity \( v \) at the finish will be \( \left( \sqrt{a_1 a_2} \right) t \).