The first case is indeed geometric distribution. The general formula to solve any of these kinds of problems however is binomial distribution.
The reason why it's binomial distribution is because not only do you have to figure out the total probability for a particular case (for example: 1 sunny day and 3 rainy days) but you also have to multiply this with the number of ways to construct this case.
You should probably know that the number of ways to construct each case is just the binomial coefficient $\binom{n}{k}$, where $n$ is the total number of days and $k$ is either the number of sunny or rainy days. If not, it's not hard to just count up the cases for these problems. Just replace that thing with the number of cases you count. Multiplying this with the probabilities, we have the formula $\binom{n}{k}p^k(1-p)^{(n-k)}$. Finally, we just sum up all of the cases we need.
It's easy to show that the total probability is $1$. The binomial theorem states that the expansion:
$$
(x+y)^n = \sum\limits_{k = 0}^n \binom{n}{k}x^ky^{n-k}
$$
Setting $x = p$ and $y = 1-p$ we get:
$$
(p+1-p)^n = \sum\limits_{k = 0}^n \binom{n}{k}p^k(1-p)^{n-k} = 1
$$
For part C, we could just add up all the individual cases, but we could also just find the inverse probability and subtract it from $1$.
$$
1-\sum\limits_{k = 1}^n \binom{n}{k}p^k(1-p)^{n-k} = 1 - p^0(1-p)^{n-0} = 1 - (1-p)^n
$$
And that should pretty much explain all of those problems.
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$$
Best Answer
Well we can think of it in this way.
On the first day we have at least 1 weather block with probability 1. On the next day, the probability of the weather changing and giving us another block is $$\frac{4}{5}\times\frac{3}{5} + \frac{1}{5} \times \frac{4}{5}$$
This occurs $n-1$ days and thus the expected number of weather blocks for $n$ days is given by $$E(X_n) = 1 + (n-1) \frac{16}{25}$$
Plugging in $n = 10$ we expect $\frac{169}{25}$ or roughly $6.76$ weather groups.