A slower car will travel less distance in the same time.
To know which car traveled slower, we have to compare the distance travelled for the same time, for example t = 3 hours. We can select any time because the speeds are constant (that is why the distance is a proportional function of time).
We can compare them in the graph as:
In the graph we can see that, in 3 hours, car B traveled a longer distance than car A.
Then car A is slower.
Answer: the slower car is car A.