Move everything else step by step to the left hand side.
But things are not that simple in the end. Even if you solve for ni, it will be still a function of nf, plus, even plugging some known visible light wavelength won't yield integer result, you will need to round the result and then calculate the wavelength again to see if it really is in the visible range.
IMHO better approach is to write a program that will calculate wavelength for many nf/ni pairs and select those in the visible spectrum. Simple nested loop will do the trick.