I’m on a train going 100 mph and toss a ball to my friend inside the train. The ball travels at 25 mph. So from a stationary point outside the train the ball going 125 (or 100). What if I toss the ball out the window to someone standing by the tracks. Does the ball hit the person at 100 mph?

The ball’s velocity can be modeled as a three-dimensional vector; each dimension has a separate magnitude. So let’s assume the train is traveling in a perfectly straight line east, and you throw the ball exactly north. Relative to the ground, it will travel north at 25mph, while also traveling east at 100mph, yielding a diagonal line (as compared to the tracks, for instance.)