If ray travelling in air is incident on a transparent medium as shown in the…