with 4 prisoners the probability of success is about 0.37, which is better than chance. (the probability of success turns out to be one minus the difference of two harmonic numbers.)
it's hard to give a hint without giving the answer. the best i can do is that it has to do with the structure of cycles in permutations.