In the given situation, AB is the incident wavefront that moves from medium 1 (with refractive index \( n_1 \)) to medium 2 (with refractive index \( n_2 \)). When the wavefront passes through the boundary of the two mediums, refraction occurs according to Snell's law. Refraction causes the wavefront to change its direction and curve as it enters the second medium.
This means that the refracted wavefront will be at an angle that depends on the refractive indices of both mediums. The correct shape for the refracted wavefront, when viewed from the side, is \( A'B \). This is the characteristic feature of refraction where the incident wavefront \( AB \) bends to form a new wavefront.
Thus, the correct answer is option (3) \( A'B \).