Explanation:
if repetition is allowed
we have then 26 possibilities for each of the first 2 positions (letters). that means
26×26 possible options
and 10 possibilities for each of the following 3 digit positions. that means
10×10×10 possible options.
combined we have therefore
26×26×10×10×10 = 26²×10³ = 676,000 possible different ID numbers.
if repetition is not allowed, then we have to reduce the possibilities of the following positions by the choices made for the previous positions.
for the 2 letter positions that means for the first positing we have the full choice of 26 letters, but for the second one only 25, as we cannot repeat the choice of the first position.
that gives us
26×25 possible options.
and in the same way for the digit positions
10×9×8 possible options
as we cannot repeat the choice of the first and then also of the second position.
combined we have therefore
26×25×10×9×8 = 468,000 possible different ID numbers.
we don't need to consider any other potential repetition, because the letters cannot be repeated at the digit positions and the digits cannot be repeated at the letter positions anyway.