If you keep rolling a pair of dice together till a sum of 5 or 7 is obtained, then what is the probability that a sum of 5 comes before a sum of 7?

2/5

This can be solved in a generic and complex way but let us not go into all that.

There can be four ways through which the pair of dice results in a sum of 5. There can be six ways through which the pair of dice can result in a sum of 7.

Now, we want the probability of the pair of dice resulting in a sum of 5 before a sum of 7. Thus probability = 4/(4+6) = 4/10 or 2/5.