Motion is relative though. Both the portal and the people are presumably on earth (or any other planet) and will thus be moving around in space at a fast pace. So the people have momentum, just not relative to the earth (or I guess more specifically not relative to the specific patch of earth they’re on).
So there’s 2 options:
Portals do not respect the laws of relative motion -> the people will get yeeted in some direction because the earth they’re on goes very fast through space and the portals are not pointing in the same direction
Portals do respect the laws of relative motion, in which case the people will get yeeted with the speed of the train
Motion is relative though. Both the portal and the people are presumably on earth (or any other planet) and will thus be moving around in space at a fast pace. So the people have momentum, just not relative to the earth (or I guess more specifically not relative to the specific patch of earth they’re on).
So there’s 2 options: