It's not very magic.

If you look at the provided node tree, and go through it step by step it should be pretty clear.
It takes the background color with the opposite of the image's alpha, and does a premult. This leaves the image with the background color wherever the original image was transparent. Black where the original image was opaque.
Then, it subtracts the matted background from the original image.
I'm not exactly sure why you feel you HAVE to have white backgrounds coming out of Maya. I'm not hyper experienced with Final Gather, but if you uncheck "primary visibility" for an object, it can still cast light for Final Gather, but you can render your main object against the standard black background.
1 - Read up on color correction and premultiplication. No real magic there, either. It's the same in any app.
2 - I didn't have any problem just using an ordinary merge/Over. Not sure what issue you were having.