Bayes' rule with 3 variables

Taking it one step at a time: $$\begin{align} \mathsf P(R\mid H, S) & = \frac{\mathsf P(R,H,S)}{\mathsf P(H, S)} \\[1ex] & =\frac{\mathsf P(H\mid R,S)\,\mathsf P(R, S)}{\mathsf P(H, S)} \\[1ex] & =\frac{\mathsf P(H\mid R,S)\,\mathsf P(R\mid S)\,\mathsf P(S)}{\mathsf P(H, S)} \\[1ex] & =\frac{\mathsf P(H\mid R,S)\,\mathsf P(R\mid S)}{\mathsf P(H\mid S)}\frac{\mathsf P(S)}{\mathsf P(S)} \\[1ex] & =\frac{\mathsf P(H\mid R,S)\;\mathsf P(R\mid S)}{\mathsf P(H\mid S)} \end{align}$$


You don't really need Bayes' Theorem. Just apply the definition of conditional probability in two ways. Firstly,

\begin{eqnarray*} P(R\mid H,S) &=& \dfrac{P(R,H\mid S)}{P(H\mid S)} \\ && \\ \therefore\quad P(R,H\mid S) &=& P(R\mid H,S)P(H\mid S). \end{eqnarray*}

Secondly,

\begin{eqnarray*} P(H\mid R,S) &=& \dfrac{P(R,H\mid S)}{P(R\mid S)} \\ && \\ \therefore\quad P(R,H\mid S) &=& P(H\mid R,S)P(R\mid S). \end{eqnarray*}

Combine these two to get the result.