Spoiler!
Not much to say here. Just walk it through - the end condition is very apparent. If it helps, you can make a map of the options, but it isn't necessary.
No, it has nothing to do with anything except the mini game you have to play. Just keep trying different paths until you get to the end (you will know it is the end, I promise. There is a big word on the wall) As I said before, be aware that the floor in the room with three doors can change. You are not back in the same room