Hint:
draw the altitude from $X$ to $OB$ then: $\;\;h = AX \,\sin(\alpha)$
by the law of sines in $\triangle XOA\,$: $\;\;\cfrac{z}{\sin(\beta)} = \cfrac{AX}{\sin(\alpha+\beta)}$
The above gives $z$ in terms of $\,h,\alpha,\beta\,$: $$\,z = \cfrac{h\,\sin(\beta)}{\sin(\alpha)\,\sin(\alpha+\beta)}\,$$
$\,z'=AB\,$ can be calculated in symmetric fashion (replacing $\alpha \mapsto \pi - \alpha$): $$\;z' = \cfrac{h\,\sin(\beta)}{\sin(\alpha)\,\sin(\alpha-\beta)}\,$$
Substituting the above in the equality $\,z+z'=w\,$ gives an equation that can be solved for $\,\beta\,$:
$$
\require{cancel}
\begin{align}
\frac{h}{\sin(\alpha)}\left(\frac{\sin(\beta)}{\sin{(\alpha+\beta)}}+\frac{\sin(\beta)}{\sin{(\alpha-\beta)}}\right) & = w \\
\frac{1}{\sin(\alpha) \cot(\beta) + \cos(\alpha)} + \frac{1}{\sin(\alpha) \cot(\beta) - \cos(\alpha)} & = \frac{w \sin(\alpha)}{h} \\[6pt]
\frac{2 \cancel{\sin(\alpha)} \cot(\beta)}{\sin^2(\alpha) \cot^2(\beta) - \cos^2(\alpha)}& = \frac{w \cancel{\sin(\alpha)}}{h} \\[5pt]
w \sin^2(\alpha) \cdot \cot^2(\beta) - 2 h \cdot \cot(\beta) - w \cos^2(\alpha) &= 0
\end{align}
$$
The latter is a quadratic in $\,\cot(\beta)\,$. Its determinant $\frac{1}{4} \Delta = h^2 + w^2 \sin^2(\alpha) \cos^2(\alpha) \gt 0$ is positive, so the quadratic has two real roots, and their product is $-\cot^2(\alpha) \lt 0$ so the roots have opposite signs. The positive root corresponds to a $\beta \in (0, \pi / 2)$ which is then the unique solution.