How to switch background image during video compositing?
The order for the input sockets for the Alpha Over matters. In this case they are reversed and need to be switched.
The top socket is used for the background image, the bottom socket for the foreground (or image to be placed over using the alpha channel).


See:
Background image shows in front of 3D objects, not behind them.