Let Px be the probability that the game ends in position 3 if it starts in position x.
We know that P3=1 and P7=0
If you start in any other cell, then after you move you are essentially beginning the game again in the new cell. The probabilities for the other 7 cells can therefore be calculated from the probabilities for their neighbors that they can move to:
P5 = P2/4 + P4/4 + P6/4 + P8/4
P2 = P1/3 + P5/3 + P3/3
P1 = P2/2 + P4/2
… etc.
For each cell you have a linear equation — 9 equations for 9 cells. Use Gaussian elimination or similar technique to solve the system of equations for the 9 probabilities.
solved What is the probability that mouse with reach state A before state B