Step 1: Reduce each fraction to a single power of i.
Multiplying top and bottom by the conjugate, \(\frac{1-i}{1+i}=\frac{(1-i)^2}{2}=\frac{-2i}{2}=-i\), and similarly \(\frac{1+i}{1-i}=i\).
Step 2: Reduce the exponents using the period-4 cycle of powers of i.
Since \(2022=4(505)+2\), \((-i)^{2022}=(-i)^2=-1\).
Since \(2021=4(505)+1\), \((i)^{2021}=i^1=i\).