Hint 1
First off, pay no mind to the sample path shown on the screen.
Here's an additional hint for you. Nowhere within the problem does it say the guard can only enter each room once. It's OK for your path to move back through a previously visited room.

