backgroung image and world image

I want to use both background and world image . I want to use the curve mask premultiplied to show the world image and the background image is the animation. using roto bezier . I can do the mask then add the background latter in sequence but I want to do view both at the same time as I set keyframes for the animated mask to view the results as I work for quality.

hope I wrote that well .

I just put the second image on a plane. i have a second question can I blur the curve object on only the edges or is ther a good way to blur this. the girl climbing is on a plane the background is on the curve sky selected for materials. i need to blend the edges

Maybe duplicate the curve, extrude it symetrically, move it toward the camera slightly and apply a new slightly hazy transparent material to it.

Thanks. Ive been working on it in node editor. Ill try 3dv13pr s idea a test.