On vacation, Le Hong averaged 45 mph traveling from city A to city B. Returning by a different route that covered the same number of miles, he averaged 50 mph. What is the distance between the two cities if his total traveling time was 30 hours

if the distance is x, then since time is distance/speed,

x/45 + x/50 = 30
x = 710.53 miles

check:
710.53/45 = 15.789 A to B
710.53/50 = 14.211 B to A
total: 30 hours