Derive the relation between critical angle and the refractive index?

Derive the relation between critical angle and the refractive index?

image