Answer:
The train A weighs 137 tons and train B weighs 60 tons.
Step-by-step explanation:
We are given the following in the question:
There are two trains.
Train A and Train B.
Let x tons be the weight of train A and y tons be the weight of train B.
Total weight = 197 tons.
Thus, we can write the equation:

Train A is heavier than train B.
The difference of their weights is 77 tons.
Thus, we can write the equation:

Solving the two equations, we get,

Thus, the train A weighs 137 tons and train B weighs 60 tons.