Consider 2 cases:
Case 1:
One of the identical digits is the first digit of the number:
There are 4 options for the position of the other identical digit.
For each of these there are
9 options for the value of the identical digits (can't be 0)
9 options for the first of the non-identical digits (can't be the same as the two identical digits)
8 options for the second of the non-identical digits, (can't be the same as the identical digits or the first non-identical digit)
7 options for the last of the non-identical digits.
So there are 4×9×9×8×7=4×4536 numbers where the first digit is one of the identical digits.
Case 2:The first digit is not one of the identical digits
There are 4C2=4!2!2!=4×3×22×2=6 ways to choose the position of the 2 identical digits. (4 since you can't choose the first digit)
For each of these there are
9 options for the first digit (can't be 0)
9 options for the second non-identical digit (can't be the same as the first digit, but can be 0)
8 options for the last non-identical digit (can't be the same as the first or second digit, can be 0)
7 options for the value of the two identical digits (can't be the same as any of the other digits, can be 0)
So there are 6×9×9×8×7=6×4536 where the first digit is not one of the identical digits.
Hence there are=6×4536+4×4536=10×4536
=45360 five digit numbers with the required property.