Freddy the frog is jumping around the coordinate plane searching for a river, which lies on the horizontal line $y = 24$. A fence is located at the horizontal line $y = 0$. On each jump Freddy randomly chooses a direction parallel to one of the coordinate axes and moves one unit in that direction. When he is at a point where $y=0$, with equal likelihoods he chooses one of three directions where he either jumps parallel to the fence or jumps away from the fence, but he never chooses the direction that would have him cross over the fence to where $y < 0$. Freddy starts his search at the point $(0, 21)$ and will stop once he reaches a point on the river. The question asks me to find the $expected$ number of jumps it will take freddy to arrive at his destination
What does the word $expected$ mean ? And how do I proceed with the question
This answer tells you how to proceed with the question.
For $n=0,1,\dots,24$ let $\mu_n$ denote the expectation of the number of jumps that are needed to reach the river if the start is at a point where $y=n$.
Then to be found is $\mu_{21}$ on base of the following data:
Note that the second bullet can be simplified to:
And note that the third bullet can be simplified to:
So you are dealing with $25$ linear equalities and $25$ variables.
There is an equation $\overrightarrow{\mu}=\overrightarrow{v}+A\overrightarrow{\mu}$ and on base of that $\overrightarrow{\mu}$ can be found as $\left(I-A\right)^{-1}\overrightarrow{v}$.