Denoting the current day as index $i$ (so that yesterday is $i-1$ and the day before yesterday is $i-2$), the previous state comprises two elements, $State_{n-1}=\{S_{i-1},S_{i-2}\}$, where $S_k$ is the state of the weather for day $k$. Thus the current state is $State_{n}=\{S_{i},S_{i-1}\}$
Lettting $R$ be the occurrence of rain on a particular day, so that $\overline{R}$ is when no rain occurs for that day, there are $4$ possible values of the previous state $State_{n-1}$
$$\{\overline{R},\overline{R}\}, \{\overline{R},R\},\{R,\overline{R}\},\{R,R\}$$
For each of these $4$ states, there are only two possible next states:-
$$\begin{align}
State_n=\{\overline{R},\overline{R}\}\text { or }State_n=\{R,\overline{R}\}\text{ given }State_{n-1}=\{\overline{R},\overline{R}\}
\\
State_n=\{\overline{R},\overline{R}\}\text { or }State_n=\{R,\overline{R}\}\text{ given }State_{n-1}=\{\overline{R},R\}
\\
State_n=\{\overline{R},R\}\text { or }State_n=\{R,R\}\text{ given }State_{n-1}=\{R,\overline{R}\}
\\
State_n=\{\overline{R},R\}\text { or }State_n=\{R,R\}\text{ given }State_{n-1}=\{R,R\}
\end{align}$$
With the information given in the question, and based on the constraints of what the next state is based on the current state, you can figure out the structure of the transition matrix.
For example, the information Specifically, suppose that if it has rained for the past two days, then it will rain tomorrow with probability $0.7$, corresponds to
$$P(State_{n+1}=\{\overline{R},\overline{R}\}|State_{n}=\{\overline{R},\overline{R}\})=0.7\\\Rightarrow P(State_{n+1}=\{R,\overline{R}\}|State_{n}=\{\overline{R},\overline{R}\})=1-0.7=0.3$$
and if it rained today but not yesterday, then it will rain tomorrow with probability 0.5 corresponds to
$$P(State_{n+1}=\{\overline{R},\overline{R}\}|State_{n}=\{\overline{R},R\})=0.5\\\Rightarrow P(State_{n+1}=\{R,\overline{R}\}|State_{n}=\{\overline{R},R\})=1-0.5=0.5$$
First part:
Let $a,b,c$ represent $3$ consecutive days. Since we are in state $1$, that means we have the sequence $(a,b) = \text{(no rain, rain)}$. In order to jump onto state $0$, there must hold $(b,c) = \text{(rain, rain)}$. Then we have the sequence $(a,b,c) = \text{(no rain, rain, rain)}$. According to the assumptions, starting from $(a,b)$ we can reach $c$ with probability $p=0.5$.
Also, $P_{11} = 0$. Why? If we still have $3$ consecutive days $a,b,c$ then it must hold $(a,b) = \text{(no rain, rain)}$ and $(b,c) = \text{(no rain, rain)}$, which can't happen.
Second part:
Notice that we start from state $0$, thus $\pi(0) = \begin{bmatrix} 1& 0 & 0 & 0\end{bmatrix}$ and we are going to evaluate the probability:
$$\pi(0)\cdot P^2 = \begin{bmatrix} 0.49 & 0.12 & 0.21 & 0.18\end{bmatrix}. $$
Thus, the probability that it rains on Thursday is going to be $p=0.49+ 0.12 = 0.61$ (see part $3$).
Third part:
From part $2$ it is known that the initial state is the state $1$. Assuming that we have the sequence $(a,b,c,d)$ with $a$ corresponding to the first day (Monday) and $d$ correspond to the last day (Thursday). Thus, we want the following to hold:
$$(a,b,c,d) = \text{(rain, rain, x, rain)}.$$ $x$ could either represent a rainy day or a non - rainy day. Thus, the are $2$ paths.
1: $(a,b,c,d) = \text{(rain, rain, rain, rain)}$
2: $(a,b,c,d) = \text{(rain, rain, no rain, rain)}$
Τhus, $(c,d)$ is going to be either (rain, rain), which indeed corresponds to state $0$ or (no rain, rain), which corresponds to state $1$.
Speaking with term of states the first $4-tuple$ corresponds to the path $0\to 0\to 0$, thus we have $p_{00}\cdot p_{00}= 0.7^2=0.49$ and the second $4-tuple$ corresponds to the path $0\to 2\to 1$, thus $p_{02}\cdot p_{21} = 0.3 \cdot 0.4 = 0.12$. Adding the two probabilities, leads us to the answer of the second part.
Best Answer
Suppose it is Friday (Fr), and you are asked to determine the probability that it will rain tomorrow on Saturday (Sa). You will need to know whether it rained yesterday, Thursday (Th), and two days ago on Wednesday (We). Given the information in the problem, you can make the following table:
$$\begin{array} {c|c} \text{Rained on} & \text{Will Rain on} \\ \begin{array} {ccc} \text{We} & \text{Th} & \text{Fr} \\ \hline Y & Y & Y \\ Y & Y & N \\ Y & N & Y \\ Y & N & N \\ N & Y & Y \\ N & Y & N \\ N & N & Y \\ N & N & N \\ \end{array}& \begin{array} {c} \text{Sa} \\ \hline 0.8 \\ 0.4 \\ 0.6 \\ 0.4 \\ 0.6 \\ 0.4 \\ 0.6 \\ 0.2 \\ \end{array} \end{array}$$
Now this is a transition table , but the output states are not the same as the input states. The input states are the rain of 3 days; the input states are the rain of 1 day. So to make a transition matrix, we need the output states to be the same as the input states: 3 days to 3 days, {We, Th, Fr} to {Th, Fr, Sa}.
$$\begin{array} {c|c} \text{Rained on} & \text{Will Rain on Th Fr Sa } \\ \begin{array} {ccc} \text{We} & \text{Th} & \text{Fr} \\ \hline Y & Y & Y \\ Y & Y & N \\ Y & N & Y \\ Y & N & N \\ N & Y & Y \\ N & Y & N \\ N & N & Y \\ N & N & N \\ \end{array}& \begin{array} {c} \text{YYY} & \text{YYN} & \text{YNY} & \text{YNN} & \text{NYY} & \text{NYN} & \text{NNY} & \text{NNN} \\ \hline 0.8 & 0.2 \\ & & 0.6 & 0.4 \\ & & & & 0.6 & 0.4 \\ & & & & & & 0.6 & 0.4 \\ 0.6 & 0.4 \\ & & 0.6 & 0.4 \\ & & & & 0.6 & 0.4 \\ & & & & & & 0.2 & 0.8 \\ \end{array} \end{array}$$
Each blank entry is an impossible transition. For example, it's impossible to transition from a Friday where it rained 3 days in a row to a Saturday where it was clear 3 days in a row (the top right corner). So your final transition matrix is:
$$\begin{bmatrix} 0.8 & 0.2 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0.4 & 0.6 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0.6 & 0.4 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0.4 & 0.6 \\ 0.6 & 0.4 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0.4 & 0.6 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0.6 & 0.4 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0.2 & 0.8 \\ \end{bmatrix}$$
The "notation" (if it can even be called that) that your guide is using is replacing the yes/no sequence with a number (So YYY is 0, NNN is 7, it is quite confusing). $P_{0,0}$ is the probability that it rained for the past 3 days and tomorrow will also be a day where it has rained for 3 days.