Probability that a 5 occurs first 
Suppose we roll pair of dice until a sum of either 5 or 7 appears.
What is the probability that a sum of 5 occurs first?

Try:
Let $A$ be the event that a sum of $5$ occurs on the ith roll and $B$ that the sum of 7 occurs on the ith roll. We are interested on the event $A | A^c \cup B^c $. We have
$$ P(A | A^c \cup B^c) = \dfrac{ P(A \cap (A^c \cup B^c))}{P(A^c \cup B^c)} = \frac{P(A \cap B^c)}{1 - P(A \cap B)} = \frac{P(A \cap B^c)}{1-0} = P(A \cap B^c)$$
Is this approach correct so far?
 A: A cleaner approach would be to consider the experiment until either a sum of $5$ or $7$ is rolled at some step, say $n$. (Note that $n<\infty$ almost surely.) Then, the event $A$ is that $5$ was rolled and $B$ is that $7$ was rolled, and you need
$$
\mathbb{P}[A|A \cup B]
$$
where $A$ and $B$ are disjoint...
A: Guide:


*

*Compute the probability of $7$ appears, call it $q$.

*Compute the probability of $5$ appears, call it $p$.
We are interested in 


$$\sum_{i=1}^\infty (1-p-q)^{i-1}p$$
Remark about your attempt:
Are you intending to use some indices to denote $i$-th throw?
A: There are three approaches to this problem, which have led to the conflicting views on what counts as a good solution.
The first is to assume it is "obvious" that you can ignore any throw that does not result in a 5 or a 7. This is obvious to me as I have a degree in Maths and will be obvious to many readers, but it is not at all obvious to most people who have not done a course in probability, and it is not a trivial matter to prove.
The second method is to not make this assumption. There are then at least two possibilities. You can use an infinite sum, as some have shown, which gets a wee bit fiddly, or you can use an iterative approach. Define R(i) is the probability of getting a 5 before a 7, starting from the ith throw. This is like walking in on the run at the start of the ith throw. You can assume there has not been a 5 or a 7 so far as if there had been the run would have finished. (So R(1) is the answer we seek.) We know the chances on this throw are 
P(5) = 4/36, P(7) = 6/36 and P(anything else) = 26/36, 
so
R(i) = 4/36 + R(i+1) . 26/36
We then observe this is a Markov process - that is the probability of an event now is not affected by anything that has happened in the past, including how many throws there have been, so R(i) is the same for all i - let's call it R, and we have
R = 4/36 + 26/36 R
R (1 - 26/36) = 4/36
R = 4/10 = 2/5
But the most satisfactory answer is to prove the principle that underlies the "obvious" claim. You have then learnt something and all similar problems will be easier in the future. Again there are at least two methods as you can generalize either the summation method or the iterative method.
A: I think you are complicating it.You don't need any infinite sums. If you roll anything but a 5 or 7 you can ignore it, it's basically like it didn't happen. Thus all you have to do is say given its a 5 or 7 whats the probability it's a 5. Which equals
$(1/9)/(1/9 + 1/6)$ 
Which is about 0.4 so 40%. A similar problem, but slightly harder, to this is finding the probability of winning a game of Craps if you are interested.
A: By symmetry, each of the 36 different combinations for the dice have the same probability of being first. Thus, the ratio  
(probability of getting five first):(probability of getting seven first) 
is equal to 
(number of combinations adding up to five):(number of combinations adding up to seven). 
A more complicated argument, similar to David Robinson's answer:
Suppose we take $f$ to be the probability of getting a five on a particular roll, $F$ to be the probability of getting a five first, $s$  to be the probability of getting a seven on a particular roll $S$ to be the probability of getting a seven first, and $n$ to be the probability on a particular roll of getting neither.
After one roll, there is probability $f$ that we're done, having gotten five first. There is probability $s$ that we're done, having gotten seven first. There is probability $n$ that we're back to where we started. And remember, before we did any rolling, the probabilities for getting a five or seven first were $F$ and $S$, respectively. Since rolling neither leaves us in the same situation as before, those probabilities remain. So we have:
Probability, after first roll, of getting a five first = probability of getting a five on the first roll plus probability of getting neither times probability of getting five first.
$F = f + n*F$
$F - n*F = f$
$(1-n)*F = f$
$F = \frac f {1-n}$
Since $n=1-f-s$ and thus $1-n=f+s$, we have
$F =  \frac f {f+s}$
A: All events can be ignored until one in the desired event space are achieved. Thus you can consider this the entire sample space:
$$S=\{(1,4),(4,1), (2,3), (3,2), (1,6), (6,1), (2,5), (5,2), (3,4), (4,3)\}$$
Now you apply the law of classical probability.
