From the question given, we can infere the following information:
If the speed of trian B = b (miles/ hour)
Then speed of train A = 15 + b (miles/ hour)
Also, we know that
Then train A travels 310 miles and train B travels 280 miles in equal time
so that for train A
Also, for train B
Since time of train A and B are equal, we can equate the equations of the time for the two trains
The next step is to cross multiply the expression above, so that
310 x b = 280 (15 + b)
310b = 280 x 15 + 280 x b
310b = 4200 + 280b
Collecting like terms
310b - 280b = 4200
30b = 4200
Divide both sides by 30
b = 4200/30
b = 140
so the speed of the train B is 140 miles per hour
Train B = 140 miles/hour
From the relationship between A and B, we have established earlier
Speed of Train A = Speed of Train B + 15
So the speed of Train A = 140 + 15
Train A = 155 miles/hour
The speed of Train A = 155 miles per hour and that of Train B is 140 miles per hour