Explain how the following expression was derived? Can someone explain how the author gets to the expression after the words "This leads to:"

 A: Using algebraic rearrangement
$$\begin{align}
\frac{\alpha(x)}{1-\alpha(x)} & =\frac{\alpha\; \mathsf E(g(\mu)\mid x)}{\beta\; \mathsf E(h(\mu)\mid x)}
\\[1ex]
\alpha(x)\;\beta\; \mathsf E(h(\mu)\mid x) & =\alpha\; \mathsf E(g(\mu)\mid x)\;\big(1-\alpha(x)\big)
\\[1ex]
\alpha (x) \left(\alpha\; \mathsf E(g(\mu)\mid x)+\beta\; \mathsf E(h(\mu)\mid x)\right) & = \alpha\; \mathsf E(g(\mu)\mid x)
\\[1ex]
\alpha(x) &=\frac{\alpha\; \mathsf E(g(\mu)\mid x)}{\alpha\; \mathsf E(g(\mu)\mid x)+\beta\; \mathsf E(h(\mu)\mid x)}
\end{align}$$
Then as $\alpha = \tfrac 2 3, \beta=\tfrac 1 3$ (the mixture ratio):
$$\begin{align}
\alpha(x) &=\frac{2\; \mathsf E(g(\mu)\mid x)}{2\; \mathsf E(g(\mu)\mid x)+ \mathsf E(h(\mu)\mid x)}
\\[1ex]
 & =\frac{2\int f(\mu\mid x)\,g(x)\operatorname d \mu}{2\int f(\mu\mid x)\,g(x)\operatorname d \mu+\int f(\mu\mid x)\,h(x)\operatorname d \mu}
\end{align}$$
A: If $$\frac \alpha {1-\alpha}  = \frac p q,\tag 1 $$ then $$\alpha = \dfrac p {p+q}.$$
To see this, first multiply both sides of $(1)$ by $1-\alpha$:
$$
\alpha = (1-\alpha)\frac p q.
$$
Expand:
$$
\alpha = \frac p q - \alpha \frac p q.
$$
Move all $\alpha$s to one side:
$$
\alpha + \alpha \frac p q = \frac p q.
$$
Factor
$$
\alpha \left( 1 + \frac p q \right) = \frac p q.
$$
So
$$
\alpha = \frac{p/q}{1+(p/q)}.
$$
Then multiply the numerator and denominator by $q$:
$$
\alpha = \frac p {q+p}.
$$
