Confusion regarding Young's double slit experiment in different media

The Problem

Consider the given arrangement:

Point $$P$$ is equidistant from $$S_1$$ and $$S_2$$ .The glass slab in air has refractive index $$mu_{2}$$, and the one in water($$mu_{1}$$) has refractive index $$mu_{3}$$. We need to find the relation between $$mu_{2}$$ and $$mu_{3}$$ such that $$P$$ is the central maxima. Both glass slabs have thickness $$t$$.

Approach

If a glass slab is placed in the path of one of the slits, the path length difference is:
$$tleft[dfrac{mu_{glass}}{mu_{medium}}-1right]$$
The Condition for Point $$P$$ to be the central maxima is that there shouldn’t be any optical path difference. I believe the optical path difference is
$$left[mu_{air}tleft[dfrac{mu_{2}}{mu_{air}}-1right]right] – left[mu_{water}tleft[dfrac{mu_{3}}{mu_{water}}-1right] right]=0$$

Thus, the answer should be $$mu_{2}+mu_{1}-1 = mu_{3}$$. However, the correct answer is $$mu_{3}=mu_{1}*mu_{2}$$: Which upon reverse engineering, we will get from the equation:
$$tleft[dfrac{mu_{2}}{mu_{air}}-1right] – tleft[dfrac{mu_{3}}{mu_{water}}-1right]=0$$
So why exactly is the above equation true? It seems to me that this equation simply equates the path difference(s) without accounting for the fact that light goes through different media.

I guess to remove all confusion one has to write the wave equation. But, since the waves travel through different media, I don’t quite know how to do that.

Physics Asked on November 11, 2021