Blending help.

I had no clue how to even search for help with this, but I'm having a bit of trouble with something. So...
I have 2 layers which I want to merge together, and use onto another picture. Here is a picture of the two separate layers i want to merge;
I'm trying to do this with another figure, but this is a simplified version of what I'm trying to do. So, The following picture is what i want.
But when I merge the two layers, I get this;
I can't use the unmerged version, because the excess purple lines will be present in the picture i apply this figure onto. Is there an easy way to not have the excess parts outside the blue blur? or do i have to do some tedious trimming? I'm using Photoshop CS4, with Mac OS 10.6.3. (EDIT: I just realized that i had this against a white background, and if i had the second image on a transparent background, I'd still get the figure in the last image. But still, is there a way to cleanly clip the shape of the lower layer into the upper layer?)


J Maloney wrote:
Make the bottom layer's transparency a mask for the top layer and then hide the background and merge visible to a new layer.
If .you notice they d not have an opacity mask.
They have to make one first then drag it to the other layer.
I think they could have simply make a layer mask
then command or control clicking the layers icon to make a selection
then inverse the selection
then fill the mask selection with black
then drag that to the bottom layer the one with the squiggle line.
I write this just in case they do not know how.