The critical angle for light entering from medium X into medium Y is q. The speed of light in medium X is u. The speed of light in medium Y is
u (1 – cosq)
ucosq
u(cosq)
usinq
Let the speed of light in medium Y be v
sinq = ηyηx = uv
Therefore, v = usinq