Part B is a little more complicated. To solve it, I'm going to ask a slightly different question:
"You have 10 bills. What is the probability that no two of them share their last three digits?"
This time, imagine laying all 10 bills out in a row. Starting at one end, read the bills one at a time. Stop whenever you see a "match". If you get to the end without reading the same number twice, then (obviously) no two of them are the same.
- When you look at "bill #1", you get one 3-digit code to hold in your head.
- When you look at "bill #2", the probability of that code not being equal to bill #1 is
. And, in this case, you can move on to bill #3. - When you look at "bill #3", the probability of it not being equal to either bill #1 or bill #2 is
(by the time to get to reading bill #3, you know that bills #1 & 2 are different.) - Keep going. If you make it to bill #10, you'll have 9 distinct numbers in your head, and the probability that bill #10 isn't equal to any of them is
.
So, the overall probability of no matches comes by multiplying these nine probabilities together, giving you
 = (1 - P_{10}) = \frac{999}{1000} \times \frac{998}{1000} \times \ldots \times \frac{991}{1000} \approx 0.956)
.
So, the probability of that there
is a match (2 or more codes being equal) is

.
- - -
I fear I might have made this look more complicated than it really is. I invite anyone with a more concise argument to jump in. ;P