This is a Distance = Rate x Time problem--D=RT
The common factor between the truck and the train is Time (T)--T=D/R
The time travelled for each is the same--D/R=T=D/R
We don't need to know the time, so we drop T from the equation.
Now we have D/R for the train is equal to D/R for the truck.
D/R=D/R
From the question we know the following:
R for the train = X
R for the truck = X + 30
D for the train = 135
D for the truck = 225
Plug in the values for D and R
135/X = 225/(X + 30)
cross multiply
225X = 135(X + 30)
225X = 135X + (135 * 30)
225X = 135X + 4050
subtract 135X from both sides
225X - 135X = 135X -135X + 4050
90X = 4050
divide both sides by 90
90X/90 = 4050/90
X = 45
Finally, the speed of the train (X) =45 mph
and the speed of the truck (X + 30) = 75 mph