I am given a question which I have translated to a Discrete-time Markov chain seen in the image below
The transition probability matrix is
$$\underline{\underline{P}} = \left[
\begin{matrix}
1 - p & p & 0 \\
\dfrac p2 & 1 - p & \dfrac p2 \\
0 & p & 1 - p
\end{matrix}
\right]
$$
where $p$ is unknown. I have calculated the steady-state probabilities to be
$$\begin{align}\Pi_0 &= \frac14 \\ \Pi_1 &= \frac12 \\ \Pi_2 &= \frac14\end{align}$$
and it can be seen that these do not depend on $p$. Next, I have to find the probability of the system being in state $0$ at time $n$ and in state $2$ at time $n + 3$. I think there are $3$ ways in which this transition can occur:
$$\begin{align*}
0&\to0\to1\to2 \\
0&\to1\to1\to2 \tag{1}\\
0&\to1\to2\to2
\end{align*}$$
However, what I don't understand is how to proceed from here. I understand that this transition is geometrically distributed. Do I find the individual probabilities of events in $(1)$ as below? $$\begin{align*} P(0\to0\to1\to2) &= (1 - p) \cdot p \cdot \frac p2 \\ P(0\to1\to1\to2) &= p \cdot (1 - p) \cdot \frac p2 \\ P(0\to1\to2\to2) &= p \cdot \frac p2 \cdot (1 - p) \end{align*}$$
I still don't know how to go forward from here. Any tips?
Since every entry of $P^2$ is strictly positive, $P$ is a regular stochastic matrix, and admits a unique stationary distribution $\pi$ over $\{0,1,2\}$ such that $\pi P=\pi$. In other words, $\pi$ is a left-eigenvector of $P$ with eigenvalue $1$. It can readily be computed that $\pi = \left(1/4,1/2,1/4\right)$. Moreover, $\mathsf{Tr}(P) = 3(1-p)$ and $$ \det P = \begin{vmatrix}1-p&p&0\\p/2&1-p&p/2\\0&p&1-p\end{vmatrix} = (1-p)(1-2p). $$ If $\lambda_i$, $i=1,2,3$ are the eigenvalues of $P$, then $\sum_{i=1}^3 \lambda_i = \mathsf{Tr}(P)$ and $\prod_{i=1}^3 \lambda_i = \det P$. Indeed, $1+(1-p)+(1-2p)=3(1-p)$ and $1\cdot(1-p)(1-2p)=(1-p)(1-2p)$, so our candidate eigenvalues are $\lambda_1=1$, $\lambda_2=1-p$, and $\lambda_3=1-2p$. Note that $$\pmatrix{-1&0&1}P=(1-p)\pmatrix{-1&0&1}$$ and $$\pmatrix{1&-2&1}P=(1-2p)\pmatrix{1&-2&1},$$ and so these are eigenvectors corresponding to $1-p$ and $1-2p$. It follows then that $P$ is diagonalizable, i.e. $P=A^{-1}DA$ where the rows of $A$ are the left-eigenvectors of $P$ and $D$ is a diagonal matrix with entries equal to the eigenvalues of $P$. Since $$(A^{-1}DA)^2=A^{-1}DAA^{-1}DA= A^{-1}D^2A,$$ by induction we see that $P^n = A^{-1}D^nA$ for positive integers $n$. It follows that \begin{align} P^n &= \left( \begin{array}{ccc} 1 & 2 & 1 \\ -1 & 0 & 1 \\ 1 & -2 & 1 \\ \end{array} \right)^{-1} \pmatrix{1&0&0\\0&(1-p)^n&0\\0&0&1-2p} \left( \begin{array}{ccc} \frac{1}{4} & -\frac{1}{2} & \frac{1}{4} \\ \frac{1}{4} & 0 & -\frac{1}{4} \\ \frac{1}{4} & \frac{1}{2} & \frac{1}{4} \\ \end{array} \right)\\\\ &= \frac14\pmatrix{1+(1-2p)^n + 2(1-p)^n& 2-2(1-2p)^n&1+(1-2p)^n-2(1-p)^n\\ 1-(1-2p)^n& 2+2(1-2p)^n&1-(1-2p)^n\\1+(1-2p)^n-2(1-p)^n&2-2(1-2p)^n&1+(1-2p)^n+2(1-p)^n}. \end{align} For example, \begin{align} \mathbb P(X_{n+3}=2\mid X_n=0) &= [P^3]_{0,2}\\ &= \frac14(1+(1-2p)^3-2(1-p)^3)\\ &= \frac32 p^2(1-p). \end{align}