There's a markov chain and transition matrix:
$$ \begin{bmatrix} 1/2 & 1/4 & 1/4 & 0 & 0 \\ 0 & 1/2 & 1/8 & 3/8 & 0 \\ 0 & 0 & 0 & 3/4 & 1/4 \\ 0 & 1/2 & 0 & 1/4 & 1/4 \\ 0 & 0 & 0 & 0 & 1 \end{bmatrix} $$
I need to find $$ P(X_4 = 4 \mid X_0 = 1, X_1 = 3, X_2 = 4) $$ and $$ P(X_7 = 1 \mid X_0 = 5). $$
If I understand correctly, $ P(X_4 = 4 \mid X_0 = 1, X_1 = 3, X_2 = 4) = P(X_4 = 4 \mid X_2 = 4) $ correct me if I'm wrong.
I also know this formula: $ p^{(m)}_{ij} = P(X_{(t+m)} = j \mid X_{(t)} = i) $, the probability that we move from state i to state j in m steps.
So if i used this, it would be: $ P(X_4 = 4 \mid X_2 = 4) = p^{2}_{4 4} $ and $P(X_7 = 1 \mid X_0 = 5) = p^{7}_{5 1}$. But I do not know where to go from here. How do I calculate $p^{2}_{4 4}$ and $ p^{7}_{5 1} $? Are there any other ways I could solve this?