The given situation can be written as a system of equations:
If x is the weight of train A and y the weight of train B, you have:
x + y = 466 both weight a total of 466 ton
y - x = 332 the difference in their weights is 332 ton
solve the previous system as follow:
Solve the first equation for x:
x = 466 - y
replace the previous expression for x into the second equation and solve for y:
y - (466 - y) = 332
y - 466 + y = 332 simplify like terms left side
2y - 466 = 332 add 466 both sides
2y = 332 + 466
2y = 798 divide by 2 both sides
y = 798/2
y = 399
next, repalace the previous value of y into the expression x = 466 - y:
x = 466 - 399
x = 67
Hence, the weight of train A is 67 ton and the weitgh of train B is 399 ton