I need help solving the following problem with a recurrence relation.
A miner is trapped in a mine with three doors. The first door will lead him to safety in two hours. The second door leads him back to the same place in three hours. The third door leads him to a maze which takes him back to the same place in 5 hours. However, if the miner ever travels through the third door again, it takes him only 1 hour to go back to the same place as he remembers how to get out of the maze. The three doors look the same and so the miner always chooses each of them with equal probability, independent of which door he has taken before. What is the expected time until the miner reaches safety?
I am trying to solve it by using Markov chain with 2 states, one which indicates the miner has gone through door 3 already and the other that he has not but I'm somewhat confused. Any help will be appreciated.
P.S. This is not homework but practice for an upcoming midterm.