Cycles render layers - make overlapping parts transparent

I am using Blender Cycles to render the following 2 layers:

However, I would like the overlapping parts in image 2 (see arrows) to be transparent, not black. I have already searched for many things here (alpha over, mask layer, etc), but I still don't know what I need to do exactly in order to make those black parts transparent.

This says that all the objects in the scene are on layers 1 and 2, the house is on layer 1, and it should be covered up by layer 2 (the grass).
This says that all the objects in the scene are on layers 1 and 2, and the grass is on layer 2.