If it was fired from the rear of the train then it would surely land behind of it was fired hard enough, in the time it was in the air the train would have moved forward. In order to fly vertically from a moving train, at what angle would it need to be fired to overcome the initial influence of the train's velocity? Resolution of forces maybe?
We once had a visit to a float glass factory in St Helens, where else, and we watched a nonstop belt carrying float glass being cut. The calculation of the angle of the cut to ensure a cut perpendicular to the side was fascinating.