Hi
If you don’t have to rescale the foreground clip you can use the paint tool:
-Load the bkg and add a paint op.
-Add a big square in reveal or clone mode, select the frg as the image to reveal,
-select the shape you drowe, hit CTRL+L to lock it.
then add all the paint-shapes (revert mode) you need for masking the trees and the other stuff.
If you have to rescale, or rotate the frg clip,
you can add a 3th layer (of a composition) with the masked bkg.
HTH