What happens is that we have the following relative to the same reference frame as each other:
a_{ball} = a_{train}
This occurs as we have two forces acting here, both of equal magnitude but opposite direction. One force is the Tension in the string acting on the ball and the other force is...