It takes four hours to travel a distance of 100 miles at a constant speed of 25 miles per hour. The speed must be constant or at an average of 25 miles per hour for this to be true.
The formula for determining time spent traveling requires dividing the distance traveled by the rate traveled. In this case, the distance, 100 miles, is divided by the rate, 25 miles per hour. The time, then, is four hours. Any one of the three components of distance, time or rate is determined if the other two are known by plugging the known factors into the equation rate multiplied by time equals distance.