That one took me a while too. Once I solved it I thought "oh yeah, that was obvious in hindsight"... and then I went back to redo it to answer you and it took me several minutes to remember the solution.
Hints and solution, after the break (if I put enough lines in this of course :P)
You won't be able to solve 5,15 until you beat the room at least once. Don't even try for the star before that.
The 8-star flag gives you enough moves to reach the star - but only if the 1-star flag is gone. There's nowhere you can push the 1-star flag to get rid of it though. There is another way to remove a flag, that you probably hit in another level.
Solution:
After beating the level, return from the top. Revive the extra cat, position the cats so that the revived cat is between the 4 and the medusa. Petrify the original cat on the 1-star flag to remove it. Loop through the flags to restore your movement and get the star.