An example of basic addmix setup and what it does.
Addmix alters the alpha value of FG separately from the (inverted) alpha that is applied to BG. The logic becomes clearer if we look at the basic compositing operation (Over):
C = A * alpha + B * (1 - alpha)
Background is multiplied with inverted alpha and added to foreground multiplied by alpha. This is the most basic compositing operation used when dealing with transparency. As it is, all resulting pixel values where alpha is between 0.0 and 1.0 will be a weighted blend between FG and BG. This is all nice if the original FG element does not have contamination from different background.
The problem with compositing over rises when we have original BG luminance and color baked into FG pixels. The alpha can be 100% accurate, but the A element itself is not, and so the result will be either too bright, dark or otherwise wrong. This is a problem that can be deceivingly easily solved by eroding the alpha in. But eroding ruins your edges and can introduce nasty artifacts.
Addmix comes to rescue. Addmix alters the alpha for A and B multiplication separately, so that A or B side can get more or less weight and thus the result will be darker or lighter. The only thing that must be done is altering the alpha in a way that alpha and its inverse do not add up to 1.0 anymore in semitransparent areas. One can use Curves, power function (gamma) etc, whatever seems fit. But 0.0 and 1.0 values must remain fixed, so multiplication and addition do not work.
An explicit nodegraph for addmix in blender:
And the results on some arbitrary ugly image:
OVER WITHOUT ADDMIX | OVER WITH ADDMIX