You are merging your solid overtop your roto. A goes overtop B when over is selected as the merge operation (by default). If you wish to create an image that has the colour of your solid but the shape and alpha of your rotoshape, connect the roto to A and the solid to B and select the “mask” merge operation.