1 - (6C3 + 3*6C2)/9C3
This is the hypergeometric distribution for sampling WITHOUT replacement.
The terms with C are binomial coefficients.
The term subtracted is the probability of 0 or 1 5 dollar bill.
If you wanted sampling WITH replacement, you would use the binomial.