How to solve $x$ in terms of $a$ and $b$ in equation $\frac{1}{2}+\frac{a}{b-a}e^{-bx}-\frac{b}{b-a}e^{-ax}=0$ ($x>0,a>0,b>0, a≠b$)? Suppose $x>0,a>0,b>0,a\neq b$. How to solve $x$ in terms of $a$ and $b$ in equation $\frac{1}{2}+\frac{a}{b-a}e^{-bx}-\frac{b}{b-a}e^{-ax}=0$? If a closed-form solution is not possible, a way to approximately solve for $x$ with an expression for approximation error is also okay. Thanks!

Consider that you look for the zero of function
$$f(x)=\frac{1}{2}+\frac{a}{b-a}e^{-bx}-\frac{b}{b-a}e^{-ax}$$ for which
$$f'(x)=\frac{a b }{b-a}\left(e^{-a x}-e^{-b x}\right)\qquad \text{and} \qquad f''(x)= \frac{a b }{b-a}\left(b e^{-b x}-a e^{-a x}\right)$$
The key points are
$$f(0)=-\frac{1}{2} \qquad \qquad f'(0)=0 \qquad \qquad f''(0)=ab$$
Moreover, if $x\to \infty$, $f(x)\to \frac{1}{2}$; so, there is a root.
For an explicit approximation of the root, the idea is to perform a single iteration of Newton method
$$\color{red}{x_1=x_0-\frac{f(x_0)}{f'(x_0)}}\tag 1$$ but the problem is to find the "best" $x_0$; we have two possibilities.
The first one is based on the Taylor expansion around $x=0$
$$f(x)=-\frac{1}{2}+\frac{1}{2} a b x^2+O\left(x^3\right)\quad\implies\quad \color{blue}{x^{(1)}_0=\frac{1}{\sqrt{ab}}}$$
The second one considers the inflection point
$$f''(x)=0\quad\implies\quad \color{blue}{x^{(2)}_0=\frac {\log \left(\frac{b}{a}\right) }{b-a}}$$
A series of random test reveals that there is not much difference and that, most of the times, $x^{(1)}_0$ is a better choice than $x^{(2)}_0$. So, using it, the approximate formula
$$ \color{red}{x_1=\frac{1}{\sqrt{ab}}+\frac{a \left(2 e^{\sqrt{\frac{a}{b}}}-e^{\frac{a+b}{\sqrt{a b}}}\right)-b \left(2 e^{\sqrt{\frac{b}{a}}}-e^{\frac{a+b}{\sqrt{a b}}}\right) } {2 a b \left(e^{\sqrt{\frac{a}{b}}}-e^{\sqrt{\frac{b}{a}}}\right) }}$$
Just a single test : $a=2$ and $b=5$ lead to  $x_0=0.316228$, $x_1=0.545058$; making one more iteration gives $x_2=0.563470 $ while the solution is $x= 0.563693$.
Edit
If we accept to stay with $(1)$, we can improve $x_0$ expanding $f(x)$ as a Taylor series around $x=0$ and using series reversion.
This would give
$$\color{blue}{x_0=t+\frac{a+b}{6} t^2 +\frac{2 a^2+7 a b+2 b^2}{72} t^3 +\frac{
   4 a^3+39 a^2 b+39 a b^2+4 b^3}{1080}t^4+\frac{ 4 a^4+172 a^3
   b+417 a^2 b^2+172 a b^3+4 b^4}{17280}t^5+O\left(t^6\right)}$$ where $\color{blue}{t=\frac{1}{\sqrt{ab}}}$.
$$\color{blue}{x_1=x_0+\frac{a e^{a x_0} \left(2-e^{b x_0}\right)-b \left(2-e^{a x_0}\right) e^{b x_0}}{2 a b
   \left(e^{a x_0}-e^{b x_0}\right)}}$$
For $a=2$ and $b=5$, this gives $x_0=0.536545$ and $x_1=0.563228$ while the solution is $x= 0.563693$.
Pushing the expansion to $O\left(t^{10}\right)$ would give $x_0=0.559250$.
