We have to select five elements (r = 5) from a set of three elements (n = 3) where order matters (permutation) and repetition is allowed. Therefore, there are n^ r = 3^5 = 243 ways.
OR
You can split this up into five simpler tasks.
1. Choose an element to be "the first element".
2. Choose an element to be "the second element".
3. Choose an element to be "the third element".
4. Choose an element to be "the fourth element".
5. Choose an element to be "the fifth element".
Each of these tasks can be completed in 3 ways, because there are 3 elements to choose from. So the total number of ways of selecting five elements is
3*3*3*3*3 = 3^5 = 243.