I'm having problems solving the following equation for $\frac{q}{R}$: $$\left(\frac{q}{R}sin\phi\right)^2 + \left(\frac{q}{R}cos\phi - \frac{b}{R}\right)^2sin^2\theta = 1 $$
Edit: Based on the suggestion from Ninad Munshi, I am using the quadratic equation to try and solve this problem. Writing out the formula so that I can put it in the form of $ax^2 + bx + c = 0$ yields:
$$\frac{q^2}{R^2}sin^2\phi + \frac{q^2}{R^2}cos^2\phi sin^2\theta - \frac{2qbcos\phi sin^2\theta}{R^2} + \frac{b^2}{R^2}sin^2\theta - 1 = 0 $$
Now putting this eqn in the quadratic form where x = $\frac{q}{R}$:
$$(sin^2\phi + cos^2\phi sin^2\theta)\frac{q^2}{R^2} - \left(\frac{2bcos\phi sin^2\theta}{R}\right)\frac{q}{R} + \left(\frac{b^2}{R^2}sin^2\theta - 1\right) = 0 $$
Now with:
$$a = (sin^2\phi + cos^2\phi sin^2\theta) $$
$$b= - \left(\frac{2bcos\phi sin^2\theta}{R}\right)$$
$$c= \left(\frac{b^2}{R^2}sin^2\theta - 1\right)$$
So: $$\frac{q}{R} = \frac{\frac{2bcos\phi sin^2\theta}{R}\pm\sqrt{\frac{4b^2cos^2\phi sin^4\theta}{R^2}-4(sin^2\phi + cos^2\phi sin^2\theta)\left(\frac{b^2}{R^2}sin^2\theta - 1\right)}}{2(sin^2\phi + cos^2\phi sin^2\theta)} $$
Multiplying out under the square root sign:
$$\frac{q}{R} = \frac{\frac{2bcos\phi sin^2\theta}{R}\pm\sqrt{\frac{4b^2cos^2\phi sin^4\theta}{R^2}-\frac{4sin^2\phi b^2sin^2\theta}{R^2} - \frac{4b^2cos^2\phi sin^4\theta}{R^2} +4sin^2\phi + 4cos^2\phi sin^2\theta}}{2(sin^2\phi + cos^2\phi sin^2\theta)} $$
Simplifying:
$$\frac{q}{R} = \frac{\frac{bcos\phi sin^2\theta}{R}\pm\sqrt{-\frac{b^2sin^2\phi sin^2\theta}{R^2} +sin^2\phi + cos^2\phi sin^2\theta}}{(sin^2\phi + cos^2\phi sin^2\theta)} $$
Now I'm stuck. It seems like it should be possible to simplify further.
In the first place, without further contexts provided, I assumed that both $q$ and $R$ are unknown so you tried to solve for the ratio instead. In that case, the solution is not ideal as it contains the variable $R$. However, it might also be the fact that $R$ is a constant and you solve for $\frac{q}{R}$ for the convenience of the task that you are working on. It is an important item that you are recommended to get clear about, if not yet, before moving on.
Here is my suggestion for further simplification. $$\frac{q}{R}=\frac{\frac{b\cos\phi\sin^2\theta}{R}\pm\sqrt{-\frac{b^2\sin^2\phi\sin^2\theta}{R^2}+\sin^2\phi+\cos^2\phi\sin^2\theta}}{\sin^2\phi+\cos^2\phi\sin^2\theta}\\ =\frac{b\cos\phi\sin^2\theta\pm\sqrt{-b^2\sin^2\phi\sin^2\theta+R^2(\sin^2\phi+\cos^2\phi\sin^2\theta)}}{R(\sin^2\phi+\cos^2\phi\sin^2\theta)}\\ =\frac{b\cos\phi\sin^2\theta\pm\sqrt{\cos^2\phi\times[-b^2\tan^2\phi\sin^2\theta+R^2(\tan^2\phi+\sin^2\theta)]}}{R\cos^2\phi(\tan^2\phi+\sin^2\theta)}\\ =\underline{\underline{\frac{b\sin^2\theta\pm\sqrt{-b^2\tan^2\phi\sin^2\theta+R^2(\tan^2\phi+\sin^2\theta)}}{R\cos\phi(\tan^2\phi+\sin^2\theta)}}}$$
I believe this simplification is more for aesthetical effect than a real reduction in computation effort.