The five digit number can be of the format of aaabc or aabbc
where a,b,c are the digits
Case−1 (aaabc):
The number which is repeated thrice can be chosen in 3 ways {from 1, 2, and 3}
The number aaabc can be rearranged in 5!3!=1206=20 ways.
There can be 3×20=60 such numbers.
Case−2 (aabbc):
The number which is not repeated can be chosen in 3 ways {from 1, 2, and 3}
The number aabbc can be rearranged in 5!2!×2!=1204=30 ways
There can be 3×30=90 such numbers.
Number of 5-digit numbers that follow the given restrictions =60+90=150