The energy would come from the trolley. The people would launch out at approximately the same speed as the trolley interacts with them and the trolley would slow down in response to how much kinetic energy was transferred to the people.
This is correct. The motion of the people is relative to the Portal. It doesn't matter if the trolley is accelerating the Portal towards them or something is accelerating them towards the Portal. Therefore they accelerate out of the other side with some retained momentum. Technically it probably resembles something in between pictures A and B.
This reminds me of the experiment about whether an airplane could take off from a treadmill.
Has the trolley come to a complete halt, or even showed down? If not, then either no energy has been transferred to the people and they just flop out, or we've just invented perpetual motion.