Find probability that the marble drawn from jar B is yellow. Given that the marble drawn is yellow, find probability that it was originally from jar A There are two jars with yellow and green marbles. Jar A has $5$ yellow and $8$ green while jar B has $2$ yellow and $6$ green marbles. Two marbles are transferred from jar A to jar B and then one marble is taken from jar B.
a) Find the probability that marble drawn from jar B is yellow.
b) Given that the marble drawn is yellow, find the probability that it was originally from jar A.
I have an okay understanding of Bayes' Theorem and was able to answer part a with some help, but I am completely lost for part b. All I know is that it's P(A|Y)
For part a I set up a tree diagram, and the found the probability of each combination:
YY = (5/13 * 4/12) * 4/10 = .051284
GY = (8/13 * 5/12) * 3/10 = .076923
YG = same as above
GG = (8/13 * 7/12) * 2/10) = 0.071794
P(B|Y) = 0.276924
 A: Let $Y$ be the event that the marble we draw at the end is yellow
Let $B$ be the event that the marble we draw originated from the second jar.  Similarly define $A$.
$\Pr(Y) =  \Pr(Y\cap A)+\Pr(Y\cap B) = \Pr(Y\mid A)\Pr(A)+\Pr(Y\mid B)\Pr(B)$
$ = \dfrac{5}{13}\cdot\dfrac{2}{10} + \dfrac{2}{8}\cdot\dfrac{8}{10} = \dfrac{18}{65}\approx 0.276923\dots$
Your answer you found for this part was correct, but was unnecessarily complicated.  Each of these terms should be straightforward to calculate.  For instance, $\Pr(Y\mid A)=\dfrac{5}{13}$ because if it was the case that the ball we are looking at originated from the first jar then each of the thirteen marbles from the first jar are equally likely to have been what we drew and five of which were yellow.

To complete the second part of the problem, recall Bayes' Theorem:
$\Pr(A\mid Y) = \dfrac{\Pr(Y\mid A)\Pr(A)}{\Pr(Y)}$
We already calculated the denominator $\Pr(Y)$ in the previous part and the numerator also already appeared in the first half of the calculation for $\Pr(Y)$.

 $$\dfrac{~~\frac{5}{13}\cdot\frac{2}{10}~~}{~~~\frac{18}{65}~~~} = \dfrac{5}{18}$$

