A pair of unbiased dice are rolled together till a sum of either 5 or 7 is obtained, find the probability that 5 comes before 7 Problem : 

A pair of unaiased dice are rolled together till a sum of either 5 or 7 is obtained, find the probability that 5 comes before 7.

My approach : 
Probability P(A) of getting 5 as sum on two dice is 
$$P(A) = \frac{4}{36} = \frac{1}{9}$$
Let B the event that a sum of 7 occurs and C the event that neither a sum of 5 nor a sum of 7 occurs. We have : 
$$P(B)= \frac{6}{36} = \frac{1}{6}$$
$$P(C) = \frac{26}{36} = \frac{13}{18}$$
Please suggest how to proceed further.
 A: You are interested that the game will end where you first get sum of $5$, and that it will happen before the first "sum of $7$". Hence, by noting that the first event has $4$ elementary outcomes while the second has $6$, and by using the law of total probability, you get 
\begin{align}
P(\text{ 5 before 7}) &=  \sum_{n=1}^{\infty}P(\text{ sum of $5$}|\text{$n-1$ times neither $5$ or $7$} )P(\text{$n-1$ times neither $5$ or $7$} )\\
&=\frac{4}{36} \frac{26^0}{36^0} + \frac{4}{36} \frac{26^1}{36^1}+\cdots+ \frac{4}{36} \frac{26^{n-1}}{36^{n-1}}\\
&= 
\sum_{n=1}^{\infty} \left(\frac{26}{36}\right)^{n-1}\frac{4}{36}\\
& = \frac{1}{9}\frac{1}{1-13/18}\\
& = \frac{2}{5} .
\end{align}
A: The number of results of a pair of dice which sum to 5 is $4$. The number of results of a pair of dice which sum to 7 is $6$. Thus, if the dice are unbiased, they will produce the sum 5 before the sum 7 with probability $\frac4{4+6}=\frac25$.
More generally, for two disjoint events A and B with probabilities $a$ and $b$ respectively, to observe A before B means either that the first try yields A (this happens with probability $a$), or that the first try yields neither A nor B (this happens with probability $1-a-b$) and that the following tries produce A before B. 
This one-step reasoning indicates that the probability $p$ to observe A before B solves the equation $p=a\cdot1+b\cdot0+(1-a-b)\cdot p$, thus, $p=\frac{a}{a+b}$.
