I just got introduced to Bayes theorem, and tried solving the following question:
Two balls are drawn in succession from a jar containing 3 red balls and 4 white balls. What is the probability that the first ball was white given the second ball was red.
I used the formula given in the book implicitly using the following tree diagram,

And, then I got: $$\frac{\frac{1}{2} \cdot \frac{2}{6}}{\frac{1}{2} \cdot \frac{2}{6} + \frac{1}{2} \cdot \frac{3}{6}}$$
where $\frac{1}{2}$ represents the probability of either picking a white or red ball when we draw the first ball, $\frac{2}{6}$ represents the probability of drawing a red ball when we draw the second ball, and $\frac{3}{6}$ represents the probability of drawing a white ball when we draw the second ball.
Did I do it correctly?
No since there are no longer 7 balls after you take the first ball out.
$$\begin{split}P(W^1|R^2)&=\frac{P(W^1R^2)}{P(W^1R^2)+P(R^1R^2)}\\ &=\frac{\color{green}{\frac 47}\cdot \frac 3 {\color{red}6}}{\color{green}{\frac 47}\cdot \frac 3 {\color{red}6}+\color{blue}{\frac 37\cdot\frac 26}}\end{split}$$
The blue part is if you draw red on the first draw.