To begin with, determine the respective probabilities:
(sum of 3 on any roll of the dice)
(sum of 7 on any roll of the dice)
(You should be able to obtain these easily by counting the outcomes).
Now, we want the probability of attaining sum of 3 before sum of 7. This is equivalent to the probability that, when you obtain the first sum of 3, your previous rolls have not had sums of 7 (or 3, obviously). In this sense we have what resembles a geometric random variable:
(first sum of 3 obtained on the roll, without obtaining any sums of 7 before the roll) .
This is of course for only some value of . Summing over all possible values of , we get:
(first sum of 3 obtained without obtaining sums of 7 before)