let $(X_n)_{n\geq 0}$ be a homogeneous Markov chain with state space $S = \{0,1,2\}$ and transition matrix $P$ :
$$P = \begin{pmatrix}0.1 & 0.3 & 0.6 \\ 0.5 & 0.2 & 0.3 \\ 0.4 & 0.4 & 0.2 \\ \end{pmatrix}$$
let $T_0 = \min \{n \geq 1\, | \, X_n = 0\}$ and $\mathbb{P}_0(\cdot) = \mathbb{P}(\cdot|X_0 = 0) $
My attempt :
$$\begin{align}\mathbb{P}_0(T_0 = 2) &= \mathbb{P}(T_0 = 2|X_0 = 0) = \mathbb{P}(X_2 = 0, X_1 \neq 0|X_0 = 0) \\ & = \sum_{k = 1,2}\mathbb{P}(X_2 = 0, X_1 = k|X_0 = 0) \\ &= \sum_{k = 1,2}\mathbb{P}(X_2 = 0 | X_1 = k, X_0 = 0)\mathbb{P}(X_1 = k | X_0 = 0) \\ & = \sum_{k = 1,2}\mathbb{P}(X_2 = 0 | X_1 = k)\mathbb{P}(X_1 = k | X_0 = 0) \\ & = 0.3\cdot0.5 + 0.6 \cdot 0.4 = 0.39 \end{align}$$
is there some faster way to do this ? learning about shortcuts will help a lot with problems where the transition matrices are very big.