Take the moment car A starts to accelerate to be the origin. Then car A has position at time t
x = (20.0 m/s) t + 1/2 (2.10 m/s²) t²
and car B's position is given by
x = 300 m + (27.0 m/s) t
Car A overtakes car B at the moment their positions are equal:
(20.0 m/s) t + 1/2 (2.10 m/s²) t² = 300 m + (27.0 m/s) t
300 m + (7.00 m/s) t - (1.05 m/s²) t² = 0
==> t ≈ 20.6 s