So to solve this, I started with the total and subtract where some digit occurs only once or twice.
Total = $5^5$
Digits are only used once $= 5! = 120$
Digits occur twice: I'm starting to think this is where the inclusion exclusion comes into play because as lulu pointed out, AABCD can occur but AABBD could also occur which is still under the condition that digits occur twice but is counted twice under AA and BB.
So I think I need to find the total number of combination of digits occurring twice and then remove the double counted combinations.
Is this the correct way to do this? I'm trying to think of an easier way to do this using inclusion/exclusion.
Considering how few digits are remaining after you do a digit three times, it's probably easier to do:
A) Number of ways with a digit three times and two once +
B) Number of ways with a digit three times and one digit twice +
C) Number of ways with one digit four times and one digit once +
D) Number of ways with one digit five times.
A) is (number of ways to choose triple)(number of ways to choose singles)(ways to place triples)(remaining ways to put singles)=$5*(4*3/2){5 \choose 3}*({2 \choose 1}{1 \choose 1})=600$
B) is (number of ways to choose triple)(number of ways to choose pair)(ways to place triples)(remaining ways to put pair)=$5*4*{5\choose 3}*{2 \choose 2}= 200$
C) is (number of ways to choose quadruple)(number of ways to choose single)(ways to place quadruple)(remaining ways to put single)=$5*4*{5\choose 4}*{1 \choose 1}= 100$
D) is (number of ways to choose quintuple)(ways to place quadruple)=$5*{5\choose 5} = 5$
Total:$905$.
Doing it your way:
Total 5 numbers: is $5^5=3125$
A) number of ways all different: $5!=120$
B) number of ways where two are the same: (# values of the pair)(# values of remaining 3)(where to put the pair)(where to put the 3 remaining)= $5*{4 \choose 3}{5 \choose 2}*3! = 1200$
C) number of ways two pairs are the same:(# values of the two pairs)(# value of the remaining 1)(where to put the first pair)(where to put the second pair)(where to put on remaining)= ${5\choose 2}{3 \choose 1}{5\choose 2}{3 \choose 2}{1 \choose 1} = 900$
Total: $ 3125 - 120 - 1200 - 900 = 905$