You are right about irreducibility.
You usually find the invariant measure using $\pi=\pi P$ and linear algebra.
The invariant probability $\pi$ will be unique, since your chain is irreducible.
But your transition matrix is special, so there is a shortcut. The column sums
of $P$ are all equal to one.
Such a transition matrix is called doubly stochastic and its unique invariant probability
measure is uniform, i.e., $\pi=\left({1\over 5},{1\over 5},{1\over 5},{1\over 5},{1\over 5}\right).$
Well, I assume your second row is $[0, 0.5, 0, 0, 0.5]$.
Actually, the non-irreducibility of this Markov chain makes calculation much simpler, and I guess it is intentional.
Here are some hints:
for a), note that state 1 and 4 are communicating, so calculating $\lim_{n\to\infty}p_{11}^{(n)}$ for the whole matrix is same for the matrix:
$$
\hat P _{1,4}=\begin{pmatrix}0.2&0.8\\
0.3&0.7\end{pmatrix}
$$
some linear algebra will bring you to the answer of $3/11$.
for b) note that state 2 and 5 are also communicating, starting from state 2, we will never escape 2 and 5, and the transition matrix is
$$
\hat P _{2,5}=\begin{pmatrix}0.5&0.5\\
0.4&0.6\end{pmatrix}
$$
define the mean recurrence time of state 2 be $T_2$, similarly for $T_5$
then we have
$$
\begin{align}
T_2&=0.5+0.5T_5\\
T_5&=1+0.4T_2+0.6T_5
\end{align}
$$
the first line means that starting from state 2, you have 0.5 chance staying there which gives recurrence time of 1, and 0.5 chance moving to state 5, which results in.mean recurrence time of state 5. Similarly for the second line.
finally, some algebra will give you $T_2=3.5$.
Best Answer
For all states $j \ne 1$, if you enter state $j$, you have on average $g_j$ more steps before you get to state $1$. However, if you enter state $1$, you don't have on average $g_1$ more steps before you get to state $1$: if you enter state $1$, you're done!
In other words, $E(T \mid X_0 = i, X_1 = 1)$ should just simplify to $1$, unlike every other instance of $E(T \mid X_0 = i, X_1 = j)$, because if we know that $X_1 = 1$, we know that $T=1$.
So your system of equations should instead be: \begin{cases} g_0=0.8g_0+0.1\color{red}{\cdot 0}+0.1g_2+1 = 0.8g_0 + 0.1g_2 + 1\\ g_1=0.3g_0+0.5\color{red}{\cdot 0}+0.2g_2+1 = 0.3g_0 + 0.2g_2 + 1\\ g_2=0.2g_0+0.4\color{red}{\cdot 0}+0.4g_2+1 = 0.2g_0 + 0.4g_2 + 1\\ \end{cases}