When you roll a die, you get 4 with probabiliy 1/6 and something other than 4 with probability 5/6.
You want to get 4 three times, this happens with probability (1/6)^3.
You want to get something other than 4 two times, this happens with probability (5/6)^2.
Finally, we have to count all the combinations of three rolls ending in 4 and two rolls ending in something other than 4. For example, you might have
44NN4
4N4N4
N44N4
(where '4' represents a roll ending in 4 and 'N' represents a roll ending in something other than 4)
The number of different combinations is given by the binominal coefficient (5 3), because choosing the roll that must end in 4 automatically fixes also those that won't end in 4:

So, the final anwer is
