Question: How many five digit numbers can be made having the digits 1,2,3 each of which can be used at most thrice in a number?
I did it by assuming that there are 9 digits that can be used (3 '1's, 3 '2's and 3 '3's). The first place can be filled in 9 ways, the second place can be filled in 8 ways and so on. I got 15120 as the answer.
Unfortunately, you're making distinctions where there aren't any--for example, one digit $1$ is the same as any other, though it may have a different meaning once we choose a place for it.
The first thing I notice about this problem is that, if I want to directly count the desired numbers, there will be several cases and subcases. We could start with the case of no $1$s (with subcases two $2$s and three $2$s), then the case of a single $1$ (with subcases one $2,$ two $2$s, and three $2$s), and so on. That seems like a pain, though.
More straightforwardly, we could figure out how many five-digit numbers can be made from only digits in $\{1,2,3\},$ then figure out how many of these we don't want--that is, those with four or more $1$s, $2$s, or $3$s--and subtract it from the total.
Hopefully the following facts are clear:
How many break the rule with too many $1$s? Well, only one can have all $1$s, but what about four $1$s? Well, we know that such a number has to have exactly one place that doesn't have a $1,$ and there are two choices for what can be in this place. Can you take it from there?