Hello there
Is it possible if somebody could clearly explain (with a list of the possible combinations) on why that formula given in the question works?
Thank you so much
That is a good questions and if you manage to answer it in full it would be an excellence question. To check the formula we can start from working through the possible outcomes:

Finishing with one roll means to roll 5, P = 1/6. The formula gives the same answer:

If we consider finishing in exactly two rolls then the first roll should be any but 5 (6 will work too as it means we are not moving) and the probability of that is 5/6. For the second roll we would need to roll ONE number which sums up with the first number to get 5 (or 5 if the first one was 6), probability of which is 1/6. Final probability will be P = 5/6 * 1/6 = 5/36. The possible combinations are (6,5), (4,1), (3,2), (2,3), (1,4) out of total 36, which what the formula gives:

For finishing in three rolls we would have to roll any number but 5 in the first roll, P = 5/6. For the second roll we would need to roll any number, except one which sums up with the first roll to 5 , P = 5/6. For the third roll we would need to get ONE number which sums up with the previous rolls to 5, or 5 (if we didn’t move in the previous rolls), P=1/6. Thus, probability of finishing in three rolls P = 5/6 * 5/6 * 1/6=25/216.
We can roll 1, 2, 3, 4 or 6 on the first roll (6 won’t make us move), P=5/6. If we, for example, had 1 for the first roll, we can roll 1, 2, 3, 5 or 6 for the second roll (5 or 6 won’t make us move), P = 5/6. If we had 2 for the first roll we can roll 1, 2, 4, 5 or 6 for the second (4, 5 or 6 won’t make us move), P=5/6. The pattern keeps going. For the last roll we would need to roll ONE number which sums up with the previous rolls (only these which made us move) to 5, or 5 if we didn’t move on the first two rolls, P = 1/6.
The formula gives the same answer:
This will continue for r rolls. We will want to roll any number but one which adds up to 5 with the previous rolls in the first (r1) rolls P = (5/6)^(r1) and then roll ONE number which sums up with the previous “moving” rolls to 5, or 5 if we didn’t move before.
Therefore the student is correct in her thinking and the total probability can be calculated using this formula:
Thank you Freydis for the concise explanation. It makes a lot of sense now. Thank you for your time!