(a) Medium B is optically denser than medium A. This is because the ray of light bends towards the normal while entering medium B from medium A, which happens when light travels from a rarer (optically less dense) medium to a denser medium.
(b) The refractive index of medium B with respect to medium A is:
$$n_{BA} = \frac{\text{Speed of light in medium A}}{\text{Speed of light in medium B}} = \frac{V_A}{V_B}$$
Source: Chapter 9, Section 9.3.2 — The Refractive Index
---