Let $h$ be the function of domain $\mathbb{R}\setminus[0]$
$h(x) = \left\{ \begin{array}{lcc} e^x, & x < 0 \\ \\ \ln(x+1), & x > 0 \\ \\ \end{array} \right.$
For a certain real number $b$, the equation $y = b$ intercepts the graph of $h$ in 2 points, one with a negative x coordinate and one with a positive one that will be designated by A and B, respectively. It is known that $\overline{AB}=2.8$
Find $b$ and the x coordinates of A and B. Use your calculator for this.
To solve this I tried:
$$X_A < 0 \\ \\ Y_A = e^{X_A}\\ X_B > 0 \\ Y_B = \ln(X_B +1 ) \\ Y_A = Y_B = b$$
I also know that $b$ is in the interval $]0;1[$ and $X_A \in ]-\infty;0[ $ and $X_B \in ]0;+\infty[$.
$$\\ 2.8 = \sqrt{(X_A-X_B)^2+(Y_A-Y_B)^2} \Leftrightarrow \\ 2.8 = \sqrt{(X_A-X_B)^2+ 0} \Leftrightarrow \\ 2.8 = X_A-X_B$$
I don't think this is correct though, because $2.8 + X_B = X_A$ with $X_A$ being a negative value seems impossible.
I think I might have swapped $X_A$ with $X_B$. In that case, $2.8 = X_B-X_A$ becomes $2.8 + X_A = X_B$ which could work. Is this correct?
What did I do wrong? How do I solve this?