EDIT
I am assuming the first deposit is made when you start the savings and at the end of the year thereafter. If the first payment is made at the end of the first year, we will have to adjust accordingly as all deposits will earn interest for one year less. I have given answers for that case too. Before I go to the details, here are different values of $R$ with different assumptions that I made -
A) No compounding -
i) Deposits starting Year 0 and for 20 years thereafter (which of course changes to monthly after 9th deposit).
R = \$31.60
ii) Deposits starting at the end of first year and for 20 years thereafter (which of course changes to monthly after 9th deposit).
R = \$34.04
B) With compounding -
i) Deposits starting Year 0 and for 20 years thereafter (which of course changes to monthly after 9th deposit).
R = \$40.54
ii) Deposits starting at the end of first year and for 20 years thereafter (which of course changes to monthly after 9th deposit).
R = \$43.71
Details -
A) Without further compounding as in some recurring deposits
$A(T) = nX + nX \times I + (n-1)X \times I + ..+ X \times I = nX + \frac{n(n+1)}{2}XI$ ...(i)
$A(T)$ is accumulated amount including interest after $T$ time period.
Using (i), find $X$ when $A = \$12000, n = 20, I = 6\%$.
Then using (i), find $A(8)$ where $n = 8, I = 6\%$ and you know $X$ now. $A(8)$ as you are at the end of the $8th$ year or at the end of 9th year if first payment was at the end of the first year.
Now you make the $9th$ payment and the interest rate immediately drops. You would have been left with $11$ annual payments. Now you will make $R$ monthly payment for $143$ months (if we go by $20$ payments were being made starting from year $0$) starting the end of first month of $9th$ year. If the first payment was at the end of year one and the last payment was to be at the end of year 20, then we would make $132$ payments.
$A(12) = \displaystyle 12 \times 9X \times I + 143R + \frac{143 \times 144}{2 \times 12}RI = 12000 - A(8) - X$
Please note this time $I = 3\%$
B) With compounding - please note that as annual effective rate takes care of any compounding within the year, we should compound only annually instead of monthly -
$A(T) = \sum \limits_{k=1}^{n} X(1 + I)^k = X\frac{(1+I)^{n+1}-I-1}{I}$...(ii)
For payments only starting at the end of first year
$A(T) = \sum \limits_{k=0}^{n-1} X(1 + I)^k = X\frac{(1+I)^n-1}{I}$...(iii)
When it switches to monthly payments -
Annual sum $Y = 12R + \frac{I}{12} (11R + 10R+...R) = 12R + \frac{11 \times 12 \times 0.03}{12 \times 2}R = 12.165R$.
$Y$ should be replaced in (ii) or (iii) for compounding.