Consider a ray of light incident normally along $$OA$$. It passes straight along
$$OAA’$$. Consider another ray from $$O$$ (the object), incident at an angle $$i$$ along $$OB$$. This ray gets refracted and passes along $$BC$$. On producing this ray $$BC$$ backwards, it appears to come from the point $$I$$, and hence, $$AI$$ represents the apparent depth, which is less than the real depth $$AO$$.
Since, $$AO$$ and $$BN^{I}$$ are parallel and $$OB$$ is transversal,
$$\angle AOB = \angle OBN^{I}$$ (Alternate angles)
$$\angle BIA^{I}=\angle CBN$$ (Corresponding angles)
In $$\Delta BAO, \sin i=\frac{BA}{OB}$$
In $$\Delta IAB, \sin r=\frac{BA}{IB}$$
We know that refractive index of air w.r.t the medium
$$_{a}\mu _{m}=\frac{\sin i}{\sin r}=\frac{BA/OB}{BA/IB}=\frac{IB}{OB}$$
$$\therefore$$ Refracting index of medium w.r.t air is,
$$_{a}\mu _{m}=\frac{1}{_{m}\mu _{a}}=\frac{OB}{IB}$$
Since the point $$B$$ is very close to point $$A$$, i.e. the object viewed from a point vertically above the object.
$$\therefore IB=IA$$ and $$OB=OA$$
Hence, $$_{a}\mu _{m}=\frac{OA}{IA}$$= Real depth / Apparent depth.