There are 5 red balls and 5 yellow balls. What is the probability the third ball is red, given the second ball is red?
I tried to use the law of total probability:
P(3=R|2=R) = P(3=R|1,2=R)P(1=R) + P(3=R|2=R,1=Y)P(1=Y) = 3/16 + 4/16 = 7/16
Is that correct?
No; everything should be conditioned on $2=R$. See
https://en.wikipedia.org/wiki/Law_of_total_probability
So in place of $P(1=R)$ you need $P(1=R|2=R)$.