How to solve this?
The 2 cars go a distance given by (their velocity)*(3 hr). You know the angle between their paths. If you draw a line between their positions after 3 hrs, you have a triangle. Now it is a trigonometry problem. Perhaps use the Law of Cosines. There are other methods available too.