Bob was riding his dune buggy. Part of the time he was riding at 10 mph and the remainder of the time at 14 mph. The total distance traveled was 68 miles and it took him 5 hours. How much time was spent traveling at 10 mph?

time at 10 mph --- x hrs

time at 14 mph --- 5-x hrs

since distance = rate x time

10x + 14(5-x) = 68
solve for x