Your post in fact proposes a correct formalization of the question, and the only remaining question is whether one can use $P[A_{n+1}\mid A_n,A_{n-1}]=P[A_{n+1}\mid A_n]$ for every $n$, where $A_k$ depends on $f(k)$ only.
Rigorously speaking, this cannot be deduced from the hypotheses which were given to you and one could imagine models compatible with these hypotheses and such that the conditional probability of $A_{n+1}$ does depend on $A_{n-1}$, for example.
However, the formulation of the exercise corresponds to the implicit assumption that the probability of $A_{n+1}$ conditioned by any sequence $(A_k)_{k\leqslant n}$ of events such that $A_k$ depends on $f(k)$ only, depends on $A_n$ only. This is called the Markov property and, with this tacit convention, your solution is complete (and correct).
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
The characteristic equation $x^2-\frac{2}{3}x-\frac{1}{3}=0$ has two roots: 1 and $-\frac{1}{3}$.
$$ R_{n+1} + \frac 13 R_n = R_n + \frac 13 R_{n-1} = \cdots = R_1 + \frac{1}{3} R_0 = \frac{17}{30} \tag 1 $$
$$ R_{n+1} - R_n = -\frac{1}{3} (R_n-R_{n-1}) =\cdots = (-\frac 13)^n (R_1-R_0) = -\frac{(-1)^n}{10 \cdot 3^n}\tag 2 $$
(1)-(2) $$ R_n=\frac{3}{4}\left(\frac{17}{30}+\frac{(-1)^n}{10\cdot 3^n}\right). $$
Please check my post Show that for every positive integer $ f_n=\frac{\left ( \frac{1+\sqrt5}{2} \right )^n-\left ( \frac{1-\sqrt5}{2} \right )^n}{\sqrt5}$
The above method does not come from nowhere. For a homogeneous second order linear difference equation $$a_{n+2}-b a_{n+1} + c a_n=0 \tag 3$$ its characteristic equation is $f(x)=x^2-bx+c=0$. (3) can be written in the following form: $$ f(\mathbb{E})a_n=(\mathbb{E}^2-b\mathbb{E} + c)a_n=0 \tag 4 $$ where $\mathbb{E}$ is the forward shift operator such that $\mathbb{E} a_n=a_{n+1}, \mathbb{E}^2 a_n=a_{n+2}$.
Lemma: The solution to $(\mathbb{E}-\lambda)a_n=0$ is $a_n=\lambda^n a_0.$
This is trivial because $(\mathbb{E}-\lambda)a_n=0 \Rightarrow a_{n+1} = \lambda a_n$ which means $a_n$ is a geometric sequence.
Suppose $f(x)=0$ has two distinct roots $r, s$. Then $b=r+s, c=rs$ via Vieta's formulas. Then (3) and (4) become the following, respectively
$$a_{n+2}-(r+s)a_{n+1}+rs a_n=0,\tag 5$$ $$f(\mathbb{E})a_n=(\mathbb{E}-r)(\mathbb{E} - s)a_n=0. \tag 6$$
In the following table you will see that the "shortcut" method is simply a factorization of the characteristic equation in terms of $\mathbb{E}$.
$$ \begin{array}{lcl} a_{n+1} - s a_n = r(a_n-sa_{n-1}) & | & (\mathbb{E}-r) (\mathbb{E}-s)a_n=0\\ \Rightarrow \color{red}{a_{n+1} - s a_n = r^n (a_1-s a_0)} & | & \Rightarrow \color{red}{(\mathbb{E}-s)a_n = r^n (\mathbb{E}-s)a_0} \text{ via Lemma} \\ a_{n+1} - r a_n = s(a_n-ra_{n-1}) & | & (\mathbb{E}-s) (\mathbb{E}-r)a_n=0\\ \Rightarrow \color{blue}{a_{n+1} - r a_n = s^n (a_1-ra_0)} & | & \Rightarrow \color{blue}{(\mathbb{E}-r)a_n = s^n (\mathbb{E}-r)a_0} \text{ via Lemma} \\ \end{array} $$
Subtracting the blue equation from the red, you get $$ a_n=\frac{a_1-s a_0}{r-s} r^n - \frac{a_1-r a_0}{r-s} s^n $$
Solution with duplicate roots
There is also a shortcut. If $f(x)=(x-\lambda)^2$, or $$a_{n+1} - 2\lambda a_n + \lambda^2 a_{n-1}=0.$$
If $\lambda=0$ it's trivial: $a_n=0$. Otherwise $\lambda \neq 0$, then $$\frac{a_{n+1}}{\lambda^{n+1}} - 2 \frac{a_n}{\lambda^n} + \frac{a_{n-1}}{\lambda^{n-1}}=0 \Rightarrow \frac{a_{n+1}}{\lambda^{n+1}} - \frac{a_n}{\lambda^n} = \frac{a_n}{\lambda^n} - \frac{a_{n-1}}{\lambda^{n-1}} = \cdots =\frac{a_1}{\lambda} - a_0$$
So $\frac{a_n}{\lambda^n}$ is an arithmetic sequence, $$ \frac{a_n}{\lambda^n}=\frac{a_0}{\lambda^0}+n\left( \frac{a_1}{\lambda} - a_0\right) \Rightarrow a_n = \lambda^n(na_1/\lambda-(n-1) a_0). $$
Other examples
Some non-homogeneous linear difference equations can be converted to homogeneous higher order ones.
Example 1: Recurring Sequence with Exponent
Example 2: $a_n=3a_{n-1}+1$.
For this one, although we can convert to $a_{n+1} - 3a_{n} = a_n-3 a_{n-1}$, it's easier to do the following: $a_n + \frac 12 =3a_{n-1}+\frac{3}{2} = 3 (a_{n-1} + \frac 12) \Rightarrow a_n+\frac 12 = 3^n (a_0+\frac{1}{2}).$
Example 3 (a higher order example illustrating the use of forward shift operator): Is it possible to solve this recurrence equation?