State-action function quiz

Hi, I am trying to understand why the optimal action in state 4 was to move left.


why not the answer start from state 5 to state 1?
my answer: 0 + 0*(0.25)+0*(0.25)^2+0*(0.25)^3+100*(0.25)^4, then u get the answer is 0.391

Once you reach state 4, the arrow there tells you the optimum action is to move right.
So the state sequence is 5 → 4 → 5 → 6.