Let's Jacob's speed as x (miles per hour). This means that Andy's speed is x + 5 miles per hour.
Now, let's figure out how far each one traveled in 8 hours:
Jacob = 8 hours * x mph = 8x miles
Andy = 8 hours * x + 5 mph = 8(x + 5) miles
We know that those two distances must add up to 248. So we can write an equation to solve:
8x + 8(x + 5) = 248
Solving for x (which is Jacob's speed), we get:
Distribute the second term: 8x + 8x + 40 = 248
Combine like terms: 16x + 40 = 248
Subtract 40 from each side: 16x = 208
Divide both sides by 16: x = 13 mph
So, Jacob was traveling x = 13 mph, and Andy was traveling x + 5 = 18 mph.