Import your clean backplate first. This is the base layer on which we will stack the generated videos.
Import your first generated video and place it on top of the backplate. Check if the size is correct by toggling the video layer on and off and looking for large differences. Sometimes the size seems fine, but the AI squashed the video a bit on one or two axes. A handy fix is to set the blending mode of the video layer to Difference.
Everything that matches the background turns black, and everything that doesn't turns a bright color. Now use the transform tools and try to fix it by scaling alone. You might need to scale each axis independently. If a few pixels refuse to match perfectly, don't worry too much, we are going to cut away the generated background anyway.
After Effects has a cool AI object selection tool called the Object Matte Tool. It's located at the top center of the interface, just below the Help menu, or press Alt+W.
To use it, first double-click the video layer. It opens the video in a separate panel. Click the Object Matte Tool and hover over your person(s), and you'll see them light up, showing what it thinks the object is. Click to select. By clicking and holding the Object Matte Tool button you'll find a few extra tools. If not everything is properly selected, use the Select Brush Tool to add or subtract bits.
When happy with the selection, press Space to render the matte. Best to let it finish the whole clip before continuing. When scrubbing through the video you might see frames where the people are not, or not completely, selected. Move through the video in chunks from beginning to end and use the Object Matte Tool and Select Brush Tool to refine the selection until you're happy with the result. This sounds harder than it actually is.
When you're done, and you've verified in your main composition that the video appears solid and doesn't flicker, freeze the cached object matte by clicking the button labeled Freeze at the bottom of the video panel where you made your matte selections. This saves you from re-rendering each matte every time you reopen your After Effects project.