We are selecting three digits from {1,3,4,5}
We can choose the first digit any of 4 ways, as 1,3,4, or 5.
For each of those 4 ways to choose the first digit, we can
then choose the second digit any of 4 ways, as 1,3,4, or 5,
since we can choose the same digit more than once.
That's (4)(4) ways we can choose the first two digits.
For each of those (4)(4) ways we can choose the first and
second digits, we can then choose the third digit any of 4
ways, as 1,3,4, or 5, since we can choose the same digit
more than once.
That's (4)(4)(4) ways we can choose the first three digits.
Multiply that out. That's the answer.
Edwin