If you were to place the metal balls on the floor of the box, wouldn't they move in the opposite direction the train is travelling in? Or would they remain motionless?
No. If the train were not accelerating
the balls would not appear to be moving.
You know this is true if you have ever ridden in an airplane (or even a car) that is moving (compared to the earth) in a straight line without slowing down or speeding up.
I have ridden in an airplane going more than 300 mph. I can put things on the tray in front of me and to me they appear to be motionless. Pf course when the plane is accelerating (speeding up to take off for example), anything on my tray gets "pushed" backwards onto my lap. But when the plane is in steady level flight, any objects appear to be motionless.
So putting metal balls (or anything else) on the floor will give you no clue about the motion of the box.