Constant Velocity Problem

This problem came from my physics book, but the pre-calculus forum seems the most appropriate, as there is no physics forum, unless I missed it. I was able to solve the problem, but in a way that was not true to the description, and am wondering what the algebraic solution is. This is the problem description:

Quote:

A person takes a trip, driving with a constant speed of 89.5 km/hr except for a 22.0-min rest stop. If the person's average speed is 77.8 km/hr, how much time is spent on the trip and how far does the person travel?

The way I solved this was by using two functions, one with a slope of 77.8 km/hr, with x and y intercept at the origin, and the other with a slope of 89.5 km/hr with an x-intercept of (.367 hr, 0 km), and a y-intercept of (0 hr, -32.8 Km), this y intercept computed by figuring how much displacement occurs in 22 minutes at 89.5 Km/hr. So my two equations were y = 77.8x and y = 89.5x - 32.8. Plotting them on a TI-89 and noting the intersection (2.8 hr, 218 Km), I arrived at the correct answer.

However, how to figure this out algebraicly is stumping me, and the book does not have a worked-out example like this problem. This is very frustrating, as I feel that I'm missing something very basic here.