The distance travelled by each train is given by the product between their speed and the amount of time travelled. For train A, its speed is 25 mph, therefore, in 3 hours the distance travelled is
75 miles.
For Train B, its speed is x mph, then, in 3 hours the distance travelled is
The amount of miles farther train B be travels in three hours is the difference between the distance travelled by Train B and Train A. If we call the amount of miles farther train B be travels in three hours as d, we have the following expression