To find out how long Niles and Bob were traveling, we can use the formula:
\[ \text{Time} = \frac{\text{Distance}}{\text{Speed}} \]
For Niles:
- Distance = 35 miles
- Speed = 5 mph
\[ \text{Time}_{Niles} = \frac{35 \text{ miles}}{5 \text{ mph}} = 7 \text{ hours} \]
For Bob:
- Distance = 119 miles
- Speed = 17 mph
\[ \text{Time}_{Bob} = \frac{119 \text{ miles}}{17 \text{ mph}} = 7 \text{ hours} \]
Since both traveled for the same amount of time, the time for both Niles and Bob is 7 hours.
The answer is: A. 7 hours.