Hint: Use the total expectation formula to condition of prisoner choice.
If $X$ is the distance traveled and $T_1,T_2,T_3$ are the events that the prisoner chooses tunnel $1,2$ and $3$ respectively, then:
$$E[X]=E[X|T_1]P(T_1)+E[X|T_2]P(T_2)+E[X|T_3]P(T_3)$$
Now $E[X|T_1]=100+E[X]$, $E[X|T_2]=40+E[X]$, and $E[X|T_3]=100$
in the first case after traveling 100ft the prisoner is in the same situation as in the beginning, so it takes on average E[X] distance again to get out
in the second case it takes only 40ft for the prisoner to be in the same situation as in the beginning
in the third case it takes 100ft for the prisoner to get out
and $P(T_1)=P(T_2)=P(T_3)=\frac{1}{3}$
So you can solve for $E[X]$
There are four different classes of vertices: the initial vertex, its neighbours, their neighbours, and the opposite vertex. The matrix of transition probabilities (with the classes in that order) is
$$
\frac15\pmatrix{0&1&0&0\\5&2&2&0\\0&2&2&5\\0&0&1&0}\;.
$$
This matrix happens to have a reasonably simple eigensystem. The initial state decomposes as
$$
\pmatrix{1\\0\\0\\0}=\frac1{12}\left(\pmatrix{1\\5\\5\\1}+3\pmatrix{1\\\sqrt5\\-\sqrt5\\-1}+3\pmatrix{1\\-\sqrt5\\\sqrt5\\-1}+5\pmatrix{1\\-1\\-1\\1}\right)
$$
with eigenvalues $5^0$, $5^{-\frac12}$,$-5^{-\frac12}$ and $5^{-1}$, respectively. Thus, after $6$ steps, the components are multiplied by $5^0$, $5^{-3}$, $5^{-3}$ and $5^{-6}$, respectively, and the resulting distribution is
$$
5^{-5}\pmatrix{273\\1302\\1302\\248\\}\;.
$$
Thus, the probability to return to the starting point is $\frac{273}{3125}=\frac1{12}+\frac{151}{37500}\approx\frac1{12}+0.004$.
Best Answer
Let $p_n$ denote the probability that the bug is at $A$ after crawling a distance $n$. Then the recursive formula is $$p_{n+1}=\frac{1}{3}(1-p_n)$$
with intial condition $p_0=1$.
The $(1-p_n)$ is the probability that the bug is not at $A$ after a distance $n$ (and thus has a chance to return to $A$ the next step), and the factor $\frac{1}{3}$ is the probability that the bug goes from any other vertex to $A$.
Solve this recursion or iterate to find $p_7$.