Let $\phi(i) = E(number \space of steps \space to \space reach \space 5 | X_0=i), i \in S=\{1, 2, 3, 4,5\}$. When I am trying to find $\phi(1)$, suppose I have the following equations:
$\phi(5) = 0$
$\phi(6) = 1 + (1/2) \phi(5) + (1/2) \phi(4)$
$\phi(4) = 1 + (1/2) \phi(6) + (1/2) \phi(3)$
$\phi(3) = 1 + (1/4) \phi(1) + (1/4) \phi(2)$
$\phi(1) = 1 + \phi(3)$
$\phi(6) = 1 + \phi(3)$
I just wonder where the 1 comes from in the above equations. Thanks a lot!