Question 178582
Distance equals rate (speed) multiplied by time. 
The distance that the bus covers is the bus' rate multiplied by time. 
1.{{{D[b]=R[b]*t=31*t}}}
The distance that the train covers is the train's rate multiplied by time. 
2.{{{D[t]=R[t]*t=39*t}}}
The difference in distance, between the train and the bus, that you're looking for is 24 miles. 
{{{D[t]-D[b]=24}}}
Substitute using eq. 1 and eq. 2 from above and solve for t,
{{{D[t]-D[b]=24}}}
{{{39*t-31*t=24}}}
{{{8*t=24}}}
{{{t=24/8=3}}}
In 3 hours, they will be 24 miles apart.