The people have to exit the portal at the same speed they enter, otherwise they'd have to be squished or something weird.
If 1cm of person enters in 1 second, 1cm of person needs to leave in that second, the only other options are that part of the person disappears or gets compressed to less than 1cm.
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