Favourable cases for 5: {(1,4), (2,3)}
Favourable cases for 7: {(1,6), (2,5), (3,4)}
(I ignored the reverse cases like (4,1) for (1,4) as this happens for both 5 and 7 and hence won't affect the probability)
So, chance that total of 5 comes before 7 = 2/5
(We can ignore all other cases, as questions asks for probability of sum = 5 compared to sum = 7)
OR
P(( getting 5 as sum with a pair of dice ) =) = 4/36 {(1,4)(4,1)(3,2)(2,3)}{(1,4)(4,1)(3,2)(2,3)}
P(( getting 7 as sum with a pair of dice ) =) = 6/36 {(1,6)(6,1)(2,5)(5,2)(3,4)(4,3)}
1/9 is the probability of sum of 5 and 1/6 is the probability of sum of 7. Probability that neither happens = 26/36 = 13/18.
S=1/9+13/18×1/9+…S=1/9+13/18×1/9+…
In words win5 +loss(5,7)win5 +....
It is a GP series with first term 1/91/9 and common ratio 13/1813/18.
S=1/9(1−(13/18)) = 2/5