HURRY ILL MARK BRAINLIEST

Two​ trains, Train A and Train​ B, weight a total of 510 tons. Train A is heavier than Train B. The difference of their weights is 318 tons. What is the weight of each​ train?