A = 3W2B
B = 4W3B
transfer W from A to B gives: A = 2W2B, B = 5W3B, Probability 3/5
transfer B from A to B gives : A = 3W1B, B = 4W4B, Probability 2/5
Let event X be the event that the moved marble was white
Let event Y be the event that the marble chosen from bag B was white
We want P[X | Y]
\(P[X | Y] = \dfrac{P[Y|X]P[X]}{P[Y]}\)
\(P[Y|X] = \dfrac 5 8\\ \\ P[X] = \dfrac 3 5 \\ \\ P[Y] = \dfrac 5 8 \dfrac 3 5 + \dfrac 4 8 \dfrac 2 5 = \dfrac{23}{40}\)
\(P[X|Y] = \dfrac{\frac 5 8 \cdot \frac 3 5}{\frac{23}{40}} = \dfrac{15}{23}\)