Basically, my teacher had given the class a question regarding thin film interference that, there is a medium with refractive index $n_1$ below that there is another medium with thickness $t$ with refractive index $n_2$ and below that there is another medium with refractive index $n_3$.
Also $n_3 > n_2$ and $n_2 > n_1$, as well as we know that the wavelength of light in medium with refractive index $n_2$ is $\lambda_2$.
Now if a ray from the top (from medium with refractive index $n_1$) is projected downwards and an observer's eye is in that medium then, we have to find the condition such that there is formation of maxima in the eye.
I know that for formation of maxima, the path difference between the part of the ray that gets reflected back by the medium $n_2$ and the part of the ray that gets reflected back by the medium $n_3$ after entering $n_2$ should be $n \lambda$ (where $n$ is a non negative integer), which can be written as an equation as follows: $$2\frac{n_2}{n_1}t + \frac{\lambda_2}{2} - \frac{\lambda_1}{2} = n\lambda_1$$ where $\lambda_1$ is the wavelength of light in medium $n_1$ .
But according to my teacher, the extra path that the ray would have to travel when it is reflected back by medium $n_2$ (since it will be going from a rarer to denser medium) and the extra path the ray has to travel when it is reflected back by medium $n_3$ would be same i.e. $\frac{\lambda_1}{2}$.
So as per my teacher the equation should be $$2\frac{n_2}{n_1} t = n\lambda_1$$
But shouldn't it be $\frac{\lambda_2}{2}$ for the part of the ray that gets reflected back by the medium $n_3$ since when light wave goes from a rarer to a denser medium its phase changes by $\pi$?