A ray of light is incident on a body x as shown in the diagram…