My question is how exactly alpha addition works?
Like when you add 0.5 and 0.5 alpha you don't get 1.0 alpha, you get ~0.75 alpha.
(This works regardless of language or even program, it works like this in e.g. gimp too)
So what are the two alpha values that exactly give 1.0 alpha?
They add like percentages. Your first 0.5 gives you 50%, and your second 0.5 gives you 50% of the remaining 50%, i.e. a further 25% - making 75% in total, i.e. 0.75
They will only add to 1.0 if one of them is 1. So, if you want a fully opaque result, you might paste the combined images onto a fully opaque background.