B for sure. Consider a long pole (stationary relative to the track) entering the portal at the front of the trolley, it would leave the portal at the speed the trolley is moving.
Yes but it wouldn't be possessed of any momentum, it only appears to be moving because the train is moving. As soon as it cleared the portal it would drop straight to the ground.