Let 'x' and 'y' be the speed (in km/hr) of cars starting from both A and B respectively.
If they both move in east direction, then B will overtake A only if y > x.
Also, relative speed of both the cars when they move in east direction = (y - x) km/hr
It is mentioned that they take 7 hours to meet. i.e. they travel 350 km in 7 hours with a relative speed of (y-x) km/hr.
Hence, (y - x) = 350/7 = 50 km/hr.