Car A starts from rest at t=0 and travels along a straight road with constant accelaration 2m/s2 until it reaches a speed of 27 m/s. Afterwards it maintains this speed. Also, when t=0, car B located 2000m down the road is travelling towards A at constant speed of 20 m/s. Determine the distance traveled by car A when they pass each other.