(a) When the train passes over a railway track, the whole weight of the train acts on the railway line beneath it. Due to large sized concrete sleepers, the force of this weight spreads out over a large area, thereby reducing the pressure on the ground. As a result, the railway track can bear it.
(b) As long as the bucket is inside the water, its effective weight is less in accordance with Archimedes' principle. When the bucket comes out of water, there is no upthrust due to water now. So the bucket appears heavier.