Choose the denser medium from the given figure:
Light ray bends away the normal while moving from denser medium to rarer medium and vice-versa.
Since, angle of incidence ( ∠ i = 15 ° ) is less than angle of refraction ( ∠ r = 30 ° ), from the figure we can infer that medium 1 is denser and medium 2 is rarer as the light ray moves away from the normal after refraction.