Viewport and Rendered image don't match

Hi, I set up render layers to give me just the Trolley+shadow. It starts rendering exactly like it looks in the camera’s rendered viewport. But the image I get at the very end to save is the whole room! What am I missing?


Have you made sure the compositing is set up so both render layers are used?