Let x = rate of speed from city A to city B
Let x-10 = rate of speed back from city B to city A
The distance is the same in both directions.
distance = speed * time
x * 2 hours = distance
(x-10) * 2.5 hours = distance
2x = 2.5x - 25
0 = 0.5x - 25
0.5x = 25
x = 50 miles per hour
distance = 50 mph *2 hours = 100 miles