Edit: I missed a key requirement in the question.
~~This can be solved by reframing the problem a couple of times.~~
~~Firstly, imagine you have a string of 25 red beads. You must make four cuts, dividing the string into five strings of red beads (where a string can have any number of red beads, including zero). The number of ways of doing this will be the same as the answer to your question (can you see why?).~~
~~Now join the string together again, except that at each join, put a blue bead. You now have a string of 29 beads, 25 red and 4 blue. The number of different permutations of these 25 red and 4 blue beads is the same as the answer to your question (can you see why?).~~
~~(For the next part, it sometimes helps to imagine that each of the red beads is a different shade of red, and each of the blue beads is a different shade of blue).~~
~~The answer to the bead permutations is the number of permutations of the full 29 beads, divided by the number of permutations of the 25 red beads, divided by the number of permutations of the 4 blue beads.~~
~~This is 29! / (25! . 4!), which simplifies to \
(29 x 28 x 27 x 26) / ( 4 x 3 x 2 x 1) \
= 23,751~~
~~All this assumes that the numbers can be anything, not just divisible by five. Your examples have all the numbers divisible five. If I’m wrong you can simplify by thinking of it as a string of five (25/5) red beads.~~