# Photon frequency when transitioning from one medium to another

$E=h\nu$ where $\nu$ is frequency and $h$ is Planck's constant. The frequency, wavelength and speed are related as $c=\lambda\nu$. When transitioning from one medium to another the speed decreases by a refraction index $n$. Hence, $\frac{c}{n}=\lambda\nu$. Solving for frequency $\nu=\frac{c}{\lambda n}$. Hence, the frequency goes down when light entered from less dense medium to denser one. However, when a shoot a laser beam at $\lambda$=1550 nm via a slab with higher refractive index than it was emitted and I measure the wavelength after it passes via the slab I get the 1550 nm. I do understand that I am measuring it in air but from where it draws the energy to adjust its wavelength back to 1550 nm when it exists the medium from higher refractive index to lower one (air)?

You're confusing frequency and wavelength. $1550\,\text{nm}$ is a wavelength, not a frequency. Upon entering a different medium, an electromagnetic wave changes its speed and wavelength while the frequency, and hence the energy per photon, remains constant.