Algebra question with sequences. I dont know how to solve it. Can somebody help but also tell me how to approach these kind of questions.

Terms of the sequence $a_1, a_2, \ldots, a_{2020}$ are obtained by the rule
$$
a_2 = \frac{1+a_1}{1-a_1}, \qquad
a_3 = \frac{1+a_2}{1-a_2}, \qquad \ldots, \qquad
a_{2020} = \frac{1+a_{2019}}{1-a_{2019}}
$$
If $a_{2020} = \frac{1}{5}$, find $a_1$.


Given equatiobn is:
$$A_{n+1}=\frac{1+A_n}{1-A_n} \implies A_{n+1} (1-A_n)=1+A_n~~~(1)$$
Let $$1-A_n=\frac{B_n}{B_{n-1}} \implies A_{n+1}=1-\frac{B_{n+1}}{B_n}$$Then (1) becomes
$$\frac{B_n-B_{n+1}}{B_n}\frac{B_n}{B_{n-1}}=2-\frac{B_n}{B_{n-1}}$$
$$\implies B_n-B_{n+1}=2B_{n-1}-B_n \implies B_{n+1}+2B_{n-1}-2B_n=0$$
Let $B_n=x^n$, then $x^2-2x+2=0 \implies x=(1\pm i)=a,b$ $$\implies B_n=P a^n +Q b^n\implies A_n=\frac{B_{n-1}-B_n}{B_n}=\frac{P a^{n-1}(1-a)+Qb^{n-1}(1-b)}{Pa^{n-1}+Qb^{n-1}}$$
So $$\implies A_n=-i\frac{a^{n-1}-Rb^{n-1}}{a^{n-1}+Rb^{1-n}}=-i\frac{1-Re^{i\pi(1-n)/2}}{1+Re^{i\pi(1-n)/2}}$$
$$A_{2020}=-i\frac{1-iR}{1+iR}=\frac{1}{5}\implies R=\frac{-1-5i}{i+5} \implies A_1=-i\frac{1-R}{1+R}=\frac{3}{2}$$
