Answer:
Train B
Step-by-step explanation:
Let's find each train's speed using the following formula.

where
is distance and
is time.
Train A
Train A travelled a distance of 120 kilometers in 3 hours.

Substitute the values into the formula and divide.


Train B
Train B travelled a distance of 180 kilometers in 4 hours.

Substitute the values into the formula and divide.


45 kilometers per hour is greater than 40 kilometers per hour, so Train B travelled faster.