I have the following problem:
Bob is a salesman. Each week, Bob will either make no money, make a small amount of money, or make a large amount of money. And if Bob makes money, he will either make \$100 (small amount) or \$1000 (large amount). For any given week, if Bob doesn't make any money in the previous week, then the probability that he will make a small amount of money is 0.6, and the probability that he will make a large amount of money is 0.3. For a week where he made a small amount of money in the previous week, the probability of making a small amount of money is 0.4 and the probability of making a large amount of money is 0.2. If Bob made a large amount of money in the previous week, then this week he will make a small amount of money with probability 0.3, and no money with probability 0.7. Let this be a Markov chain $(X_n, n \ge 0)$ with state space $\{0, 1, 2 \}$, where making no money is $0$, making a small amount of money is $1$, and making a large amount of money is $2$.
I calculated the transition matrix as
$$\begin{bmatrix} 0.1 & 0.6 & 0.3 \\ 0.4 & 0.4 & 0.2 \\ 0.7 & 0.3 & 0 \end{bmatrix}$$
I am trying to calculate $P(X_5 = 2 \mid X_3 = 0, X_1 = 1)$. The problem here is that we are not given $X_4$, so the jump from $X_3$ to $X_5$ is actually two jumps, so I don't understand how we proceed. I've been searching for resources that explain this, but all of the examples I could find were for probabilities that were conditioned on something that was only 1 step in the past. How do we calculate $P(X_5 = 2 \mid X_3 = 0, X_1 = 1)$?
EDIT:
I'm now trying to work backwards. If we start with $X_3 = 0$, then we have with probability $0.1$ that $X_4 = 0$, $0.6$ that $X_4 = 1$, and $0.3$ that $X_4 = 2$. Now, since we know that $X_5 = 2$, we know that the relevant probabilities are that $X_4 = 0$ with $0.3$, $X_4 = 1$ with $0.2$, and $X_4 = 2$ with $0$. I'm not sure if this is on the right track.
Hint: $$P(X_5 = 2 \mid X_3 = 0, X_1 = 1) = \sum_{n=0}^2P(X_5 = 2 \mid X_4 = n)P(X_4=n\mid X_3=0)$$