For a car moving at a constant speed, the distance traveled varies directly with the time spent driving. If such a car travels 500 miles in 10 hours, how long does it take to travel 400 miles?

____ hours ​