Using addition formulas brings weird results So, I have this set of equation that I want to solve for x,y
$$
A = \tanh(x+y) \\
B = \tanh(x-y)
$$
and of course it can be solved by inverting and then summing/differencing, so I get
$$
x = \dfrac{1}{2}\bigg(arctanhA + arctanhB \bigg) \\
y = \dfrac{1}{2}\bigg(arctanhA - arctanhB \bigg)
$$
But what if I want to use addition formula (and I need to because this is just a short version of the equations that I have, where the above method cannot be used) writing
$$
A = \dfrac{\tanh x + \tanh y}{1+\tanh x \tanh y} \\
B = \dfrac{\tanh x - \tanh y}{1-\tanh x \tanh y}
$$
Now I get a quadratic equation for $\tanh x$ and I didn't figure out how to show that it gives the same result. I tried using identities and also plotting the two results but they are different. Here is the quadratic equation that I have:
$$
\tanh y = \dfrac{A - \tanh x}{1-A \tanh x} \\
B \bigg[ 1 - \tanh x \dfrac{A -\tanh x}{1- A\tanh x} \bigg] = \tanh x - \dfrac{A -\tanh x}{1- A\tanh x}
$$
and then finally for $\tanh x$
$$
(A+B) \tanh ^2 x -2 \tanh x(A+1)  + A+B=0
$$
 A: $\newcommand{\at}{\operatorname{arctanh}}$
$$B \left(1 - \tanh x \frac{A -\tanh x}{1- A\tanh x} \right) = \tanh x - \frac{A -\tanh x}{1- A\tanh x}$$
$$B \left(1-A\tanh x - \tanh x (A -\tanh x) \right) = (1- A \tanh x)\tanh x - (A -\tanh x)$$
$$B-2 A B\tanh x +B \tanh^2 x = 2\tanh x-A \tanh^2x-A$$
$$(A+B)\tanh^2x-2(1+AB)\tanh x + A+B=0$$
You made a mistake when getting the quadratic.
After solving the quadratic and some simplification
$$\tanh x =\frac{1+A B\pm\sqrt{(1-A^2)(1-B^2)}}{A+B}$$
We choose the $-$ sign because $\tanh x \in (-1,1)$, and finally
$$x =\at\left(\frac{1+A B-\sqrt{(1-A^2)(1-B^2)}}{A+B}\right)$$
Now you will be able to verify that $$\frac{1}{2}\left(\at A + \at B \right) =\at \left(\frac{1+A B-\sqrt{(1-A^2)(1-B^2)}}{A+B}\right)$$ using some of the known identities.
A: I think your original problem with equations like
$$A = \tanh (x+y) + (1-p) \tanh x$$
is more complicated than the simplified problem.
Look at what the solutions can be (using Geogebra) for $A=0.6, B=0.3,p=0.2$ for example:

(are the equations the good ones ?).
