<s>[INST] Rolling two dice, what is the probability that two consecutive $7$s happens earlier than a $12$? Alice and Bob are playing a game involving two dice. If a sum of 12 appears, Alice wins and they stop playing. If a 7 appears twice in a row, Bob wins and they stop playing. What is the probability that Bob wins this game?
My thought was to draw a tree diagram, which I did, but I can't seem to wrap my head around the recursion that is in the problem. How do I put this into the tree? Thanks!
 [/INST] Such problems are often solved by partitioning sample space on the first throw. Let $X$ be the RV denoting the sum in the first throw and $P(B)$ be the probability $B$ wins,then: $$\begin{align} P(B) &= P(B,X = 7) + P(B, X\neq 7) \\ 
& = P(B|X = 7) P(X = 7) + P(B|X\neq7) P(X\neq 7)\tag{a}\label{eq}\end{align}$$
Given that the first throw is 7, B wins immediately if the second throw is  7 as well. If second throw is neither 7 nor 12, then the game begins again. Hence, $$P(B|X=7) = \frac{1}{6} + \frac{29P(B)}{36}$$
For $P(B|X\neq 7)$ partition further by $X\neq 12$. $$\begin{align}P(B|X\neq 7) &= P(B, X\neq 12|X\neq 7) + P(B, X =12 |X\neq 7) \\ &= P(B| X\neq 12,X\neq 7)P(X\neq 12|X \neq 7) + P(B| X =12 ,X\neq 7)P(X = 12|X\neq 7) \end{align}$$
B can't win if first roll is $12$, i.e. $P(B| X =12 ,X\neq 7) = 0$. If first roll is neither 7 nor 12, we are back to original game. Lastly, 
$$P(X\neq 12|X \neq 7) = \frac{P(X\neq 12,X \neq 7)}{P(X\neq 7)} = \frac{29}{30} $$
Thus, $P(B|X\neq 7) = \frac{29P(B)}{30}$
Put, all values in equation (\ref{eq})
$$P(B) = \left(\frac{1}{6}+ \frac{29P(B)}{36}\right)\frac{1}{6} + \frac{29P(B)}{30}\frac{5}{6}$$ Solves to $P(B) = \frac{6}{13}$
</s>