The two slanted interfaces each make 45∘ with the base, so they are perpendicular to each other, and their normals n^1⊥n^2.
First interface. The horizontal ray meets it at 45∘ incidence:
μ1sin45∘=μ2sinθ,
where θ is the angle from n^1 inside μ2.
Second interface. Since n^2⊥n^1, the ray meets it at incidence 90∘−θ. To leave horizontally (normal to the right face), the ray must make 45∘ with n^2 in μ3:
μ2cosθ=μ3sin45∘.
Squaring both equations and adding:
μ22=2μ12+μ32⇒μ12+μ32=2μ22.
(C)