I’m not really that good in compositing but I think I have a solution to your situation. Here is my result:
First separate your glowing object in a separate render layer. Here I have the glowing block in the second layer and the blue block in the first layer. Then I created two render layers which hold the blocks separately. Here are the render layers look like:
If you want all the background to be transparent instead of a solid color. First go to scene > shading and choose transparent from the alpha list. Also save your work in formats that accepts transparency like png: check scene > output > file format. Also choose RGBA so that the transparency can be saved. If I still get things wrong please provide a more detailed description of what you want. Words such as ‘transparency behind’ is bound to multiple interpretation. I don’t have that much resource for me to enumerate all its possible meaning. It is just a great waste of my time.
Great that you find a solution for your problem though I have a few critique of it though and I am still in the dark of what you really wanted. I also can’t see the result of your solution. What is its result on the boxes scene?