\(3A=3+3^2+...+3^{21}\)
\(3A-A=\left(3-3\right)+\left(3^2-3^2\right)+....+3^{21}-1\)
\(A=\frac{3^{21}-1}{2}\)
B - A = \(\frac{3^{21}}{2}-\frac{3^{21}-1}{2}=\frac{3^{21}}{2}-\left(\frac{3^{21}}{2}-\frac{1}{2}\right)=\frac{3^{21}}{2}-\frac{3^{21}}{2}+\frac{1}{2}=\frac{1}{2}\)