How is Bayes theorem being applied in expanding the formula of Binary Independence Model?
It can be read as the probability of R=1, given (x and y) as your second formula.
Anything after | stand for the given part.

Since:

$P(x | r=1 \wedge q) = \frac{P(x \wedge R=1 \wedge q)}{P(R=1 \wedge q)}$

$P(R=1|q) = \frac{P(R=1 \wedge q)}{P(q)}$

$P(x|q) = \frac{P(x \wedge q)}{p(q)}$

Therefore: 

$$P(R=1|x,q) = \frac{P(x | R=1 \wedge q)*P(R=1|q)}{P(x|q)} =$$

$$\frac{P(x \wedge R=1 \wedge q)}{P(R=1 \wedge q)} * \frac{P(R=1 \wedge q)}{P(q)}* \frac{P(q)}{P(x \wedge q)} =$$
$$\frac{P(x \wedge R=1 \wedge q)}{P(x \wedge q)}$$