Theory:

The Refraction of light rays, as they travel from one medium to another medium, obeys two laws, known as Snell’s laws of refraction.
 
They are given below:
  • The incident ray, the refracted ray and the normal at the point of intersection, all lie in the same plane.
512px-Snell's_Law.svg.png
  • The ratio of the sine of the angle of incidence (i) to the sine of the angle of refraction (r) is equal to the refractive index of the medium, which is a constant.
sinisInr=Constant=μ
 
Snell’s law formula is derived from Fermat’s principle,
 
From the diagram,
 
θ1 \(-\) Angle of incidence
 
θ2 \(-\) Angle of reflection
 
n1 \(-\) Refractive index of Medium 1 (Air)
 
n2 \(-\) Refractive index of Medium 2 (Liquid)
 
n1sinθ1=n2sinθ2sinθ1sinθ2=n2n1=Constant
Reference:
https://commons.wikimedia.org/wiki/File:Snell%27s_Law.svg