\(a=1+2+2^2+...+2^{2021}\)
\(\Rightarrow2a=2+2^2+2^3+...+2^{2022}\)
\(\Rightarrow2a-a=2+2^2+2^3+...+2^{2022}-1-2-2^2-...-2^{2021}\)
\(\Rightarrow a=2^{2022}-1\)
\(\Rightarrow a=2^{2022}-1=b\)
\(a=1+2+2^2+2^3+...+2^{2021}\)
\(2a=2+2^2+2^3+2^4...+2^{2021}+2^{2022}\)
\(2a-a=\)\(\left(2+2^2+2^3+2^4...+2^{2021}+2^{2022}\right)-\left(1+2+2^2+2^3+...+2^{2021}\right)\)
\(a=2^{2022}-1\)
⇒ a=b