May I have some help please?

After finding out about the Arch-Vis competition on Blender Cookie I decided to complete my first personal project. I am nearly there but I would like some help.

I was wondering how do I render the background environment hdri image on a separate render layer.

Create new render layer, set the scene layers to be rendered (second layer set in “Layers” panel) to something that doesn’t have any object and done.
Your newly created render layer will render just the “sky”, because it won’t find any other stuff to render.
Remember though that you have to have “Transparent” option in “Film” settings disabled. Sky needs to show up.

I did that but i have a problem now which is where the environment is removed but it is not masked so I am having trouble composting it properly. Is there a way for me to apply a mask?

An alternate method might to be to just enable “transparent” on the main render, then switch on the environment pass. The environment pass contains your HDRI with the occluded areas knocked out. Additionally, you get the regular alpha channel marking where the sky is. Not exactly the HDRI on a different render layer per se, but might work better for what you are trying to do.