To find the speed of the train on the way back, we can use the concept of average speed. Average speed is defined as the total distance traveled divided by the total time taken.
Let's denote the speed on the way back as "V" (in km/h). We can set up the following equation:
Average speed = Total distance / Total time
The total distance for the entire trip is 2 times the distance between X and Y (since the train travels from X to Y and then back from Y to X). Therefore, the total distance is 2 * 300 km = 600 km.
The total time for the trip can be calculated by dividing the total distance by the average speed:
Total time = Total distance / Average speed = 600 km / 120 km/h = 5 hours
Now, let's calculate the time taken for the first part of the trip (from X to Y) using the given average speed of 100 km/h:
Time taken for the first part = Distance / Speed = 300 km / 100 km/h = 3 hours
Since the total time for the trip is 5 hours and the time taken for the first part is 3 hours, the time taken for the second part (from Y to X) can be calculated as:
Time taken for the second part = Total time - Time taken for the first part = 5 hours - 3 hours = 2 hours
Finally, we can calculate the speed on the way back using the formula:
Speed = Distance / Time = 300 km / 2 hours = 150 km/h
Therefore, the train traveled at a speed of 150 km/h on the way back.