Let the first light be located at position $x = 0$, and the second light at position $x = a$. Then, at any position $x$, the amount of light received from the first light is $I_1 x^{-2}$ and the amount of light received from the second light is $I_2 (a - x)^{-2}$. So the total light received is:
$$I(x) = I_1 x^{-2} + I_2 (a - x)^{-2}$$
Differentiating with respect to $x$ to find the minimum:
$$\frac{d}{dx} I(x) = -2 I_1 x^{-3} + 2 I_2 (a - x)^{-3}$$
And setting this to zero:
$$-2 I_1 x^{-3} + 2 I_2 (a - x)^{-3} = 0$$
$$I_2 (a - x)^{-3} - I_1 x^{-3} = 0$$
$$I_2 (a - x)^{-3} = I_1 x^{-3}$$
$$\left (\frac{a - x}{x} \right )^{-3} = \frac{I_1}{I_2}$$
$$\left (\frac{a - x}{x} \right )^3 = \frac{I_2}{I_1}$$
$$\frac{a - x}{x} = \sqrt[3]{ \frac{I_2}{I_1}}$$
$$\frac{a}{x} - 1 = \sqrt[3]{ \frac{I_2}{I_1}}$$
$$\frac{a}{x} = \sqrt[3]{ \frac{I_2}{I_1}} + 1$$
$$\frac{x}{a} = \frac{1}{\sqrt[3]{ \frac{I_2}{I_1}} + 1}$$
$$x = \frac{a}{\sqrt[3]{ \frac{I_2}{I_1}} + 1}$$
So this would be the position where the light received is minimized. Notice the solution is linear in $a$. Indeed, the problem is scale-invariant, since increasing the distance between the two lights does not change their intensity ratio.
Note the singularity at $I_1 = 0$. Let us depart from the abstract realm of mathematics for a moment and consider the physical implications of turning off the first light. Take a few minutes to convince yourself that the solution is going to be $x = 0$ ("as far as possible from the second light") and the issue is resolved.
Here is a plot of where you should be (in terms of $\frac{x}{a}$), against $\frac{I_2}{I_1}$ ratios (higher $x$-values mean the second light is brighter than the first):
Notice that $\frac{x}{a} = \frac{1}{2}$ when $I_1 = I_2$, as can be reasonably expected.