I will assume that all the refractive indices that you have quoted in your question are relative to a vacuum.
The ideas of optical path and optical path difference is really all to do with counting wavelengths.
Within a thickness of glass $t_{\rm glass}$ assume there are $N$ waves each of wavelength $\lambda_{\rm glass},\, \Rightarrow t_{\rm glass} = N\,\lambda_{\rm glass}$.
The thickness of medium $t_{\rm medium}$ which has the same number of waves, $N$, each of wavelength $\lambda_{\rm medium}$, as before is $t_{\rm medium} = N\,\lambda_{\rm medium}$
The difference in thickness containing the same number of waves is $t_{\rm medium}- t_{\rm glass} = N\,\lambda_{\rm medium} - N\,\lambda_{\rm glass}$.
$f \lambda_{\rm medium} = c_{\rm medium} = \dfrac {c_{\rm vacuum}}{n_{\rm medium}}$ and $f \lambda_{\rm glass} = c_{\rm glass} = \dfrac {c_{\rm glass}}{n_{\rm glass}}$ where $f$ is the frequency, $c$ is the wave speed and $n$ is the refractive index $\Rightarrow \lambda_{\rm glass} n_{\rm glass} = \lambda_{\rm medium} n_{\rm medium} $
Substituting into the equation for difference in thickness gives $$t_{\rm medium}- t_{\rm glass}= \left (\dfrac{n_{\rm glass}}{n_{\rm medium}}-1 \right )t_{\rm glass}$$
So the number of extra waves introduced by the insertion of the glass is $$\dfrac{t_{\rm medium}- t_{\rm glass} }{\lambda_{\rm medium}}=\left (\dfrac{n_{\rm glass}}{n_{\rm medium}}-1 \right )\frac{t_{\rm glass}}{\lambda_{\rm medium}}$$
If the number of extra waves had been $\frac 12$ then the fringe pattern would have moved by half a fringe and where there had been a maximum there would be a minimum etc.
If you substitute $\lambda_{\rm medium} = \dfrac {\lambda_{\rm vacuum}}{n_{\rm medium}}$ into the equation the number of extra waves is $\dfrac{(n_{\rm glass} - n_{\rm medium})t_{\rm glass}}{\lambda_{\rm vacuum}}$
The term $(n_{\rm glass} - n_{\rm medium})t_{\rm glass}$ is called the optical path difference and relates to the wavelength in a vacuum.
A thickness of glass $t_{\rm glass}$ has the same number of waves as a thickness of vacuum equal to $n_{\rm glass} t_{\rm glass}$ and this is called the optical path length.
So in summery:
$\left (\dfrac{n_{\rm glass}}{n_{\rm medium }}-1\right )t_{\rm glass}$ relates to the wavelength in the medium
and
$(n_{\rm glass}-n_{\rm medium })\,t_{\rm glass}$ relates to the wavelength in a vacuum.