Woah, that's a gnarly formula. Let me see if I can explain this. The equation you use when solving thin film interference problems depends on the thin film.
it's either going do be 2d=(m+1/2)λ or 2d=mλ. You will use one or the other based on the thin film and what the question is asking for(constructive or destructive interference). Let me give you an example: You have some glass(n=1.5) with a thin layer of oil on top(n=1.3) with waves coming from the air on top of the oil(n=1). Let's say the question is "what is the minimum oil thickness for you to see red light?" So you probably know red light is 700nm so that will be you wavelength. Also the question asks for constructive interference since you want the reflected rays to bounce off the surface and into you eye.
d=minimum thickness of the oil layer
Incoming light will hit the air-oil border, some will reflect off and some will enter the media and reflect off the oil-glass border and then back out into the air phase. The rays bouncing off the air-oil border and the refracted rays bouncing off the oil-glass media will superimpose. In order for you to see red light, you want those 2 rays to be in phase(interfere constructively). The key to these problem is to know when a ray flips and when it doesn't. Every time a ray reflects off a medium with a larger index of refraction than the medium it is traveling in, the rays will flip 180 degrees.
The ray that hits the air-oil border will flip because oil has a higher index of refraction. The ray that travels through the oil and hits the oil-glass border will ALSO flip because glass has a higher index of refraction than oil. So both rays flipped, and if you want these two rays to be in phase with each other, you would want the extra path traveled by the ray in the oil medium to be equal to multiples of the wavelength, otherwise the rays would not interfere constructively. So the equation to this problem would be 2d=mλ for constructive interference. If you wanted destructive interference of these two rays, you would want the path length difference between the two rays to differ by exactly half a wavelength so that they are out of phase. Therefore, the equation for destructive interference would be 2d=(m+1/2)λ.
keep in mind that the wavelength will change as you enter the oil medium, so you would have to correct for that by using 2d=(m+1/2)λ/(n of oil) or 2d=mλ/(n of oil).
Sorry for the wall of text, and I hope it all made sense.