A wavefront is a surface over which an optical wave has a constant.
B) Let AP be the wavefront of the incident wave, of speed in the first medium be v1 and in the second medium be v2 propagating in the direction AA′ incident on the interface at an angle as shown in fig.
let t be time to travel the wave P to P′ , in the same time wavefront A will reach at A′,
So,
This is the snell's rule for refraction.