Let us have an $X_n$ Markov-chain with finite $S$ set as domain. $A \subset S$ is given, so that $P_x(T_A < \infty) > 0$ for all $x \in S$. $T_A=\inf \{ n \geq 1: X_n \in A\}$.
Then we take a $g: S \rightarrow \mathbb{R}$ function, such that $g(a)=0, \forall a \in A$, and $\forall b \in $(S\A),
$$g(b)=1+\sum_{x \in S} P_{b,x} g(x)$$
Prove, that $g(x)=E_x(T_A)$.
My approach:
First I had to understand the task. We have a Markov-chain, and we have an $A \subset S$, where the probability, that we land on it in a finite time is positive, this means, that for any $a \in A$, we will approach $a$ in a finite time.
We take a function, which is $0$ for any of that $a \in A$, and takes something else for the other elements:
$$g(b)=1+\sum_{x \in S} P_{b,x} g(x)$$
I tried to use the following function:
$$x \rightarrow E_x(g(X_{\min(n,T_a)}))$$
But I am stuck how to move forward. I know my task is quite complicated, maybe I don't see something to make it easier. :) Any help appreciated.