Let's say there is a retail shop. I want to know the required revenue to reach an ROI of 10%.
$$\begin{align} ROI = \frac{Revenue}{Overhead + COGS} - 1 \end{align}$$
$$\begin{align} \frac{100,000}{30,000 + 30,000} - 1 = 0.66 \end{align}$$
A shop making 100,000 with an overhead of 30,000 and cost of goods sold of another 30,000... Would generate 40,000 in profits i.e. ROI of 66%.
$$\begin{align} COGS = \frac{Revenue}{1 + Margin} \end{align}$$
$$\begin{align} \frac{100,000}{1 + 1} = 50,000 \end{align}$$
If we sell a product with a margin of 100% i.e. double the COGS of 50,000, we'd have a revenue of 100,000.
So, how can I combine these two equations, and simplify the expression...
$$\begin{align} \frac{Revenue}{Overhead + \frac{Revenue}{1 + Margin}} - 1 \end{align}$$
In order to get...
$$\begin{align} Revenue = {} ... \end{align}$$
I want to plug in the Overhead, Margin and ROI, in order to get the required Revenue.
First, I'm going to give everything shorter names: we'll call revenue $R$, overhead $O$, margin $M$, and ROI $I$, just because I'm lazy and it's less typing.
Then adding $1$ to your last line, we have $$\dfrac{R}{O+\frac{R}{1+M}}= 1+I.$$ Multiplying that by $O + \frac{R}{1+M}$ we obtain $$R = (1+I)O + \frac{(1+I)R}{1+M}.$$ Multiplying that by $1 + M$, we have $$R(1+M) = (1+I)O(1+M) + (1+I)R.$$ Subtracting $(1+I)R$ from both sides and simplifying, we have $$R(M - I) = (1+I)(1+M)O.$$ Finally, divide by $M - I$ to obtain $$R = \dfrac{(1+I)(1+M)O}{M-I}$$ as required.