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}$