Let p be the probability that student A wins. We consider the possible outcomes of the first two rolls. (Recall that each *roll* consists of the throw of two dice.) Consider the following mutually exclusive cases, which encompass all possibilities.

- If the first roll is a 12 (probability 1/36), A wins immediately.
- If the first roll is a 7 and the second roll is a 12 (probability 1/6 · 1/36 = 1/216), A wins immediately.
- If the first and second rolls are both 7 (probability 1/6 · 1/6 = 1/36), A cannot win. (That is, B wins immediately.)
- If the first roll is a 7 and the second roll is neither a 7 nor a 12 (probability 1/6 · 29/36 = 29/216), A wins with probability p.
- If the first roll is neither a 7 nor a 12 (probability 29/36), A wins with probability p.

Note that in the last two cases we are effectively back at square one; hence the probability that A subsequently wins is p.

Probability p is the weighted mean of all of the above possibilities.

Hence p = 1/36 + 1/216 + (29/216)p + (29/36)p.

Therefore p = 7/13.

Source: Extra Stuff: Gambling Ramblings, by Peter Griffin. See Chapter 6.