A ray of light is incident on a glass block as shown in the diagram…