Ta có:
\(A=1+2+2^2+2^3+...+2^{2021}+2^{2022}\)
\(\Rightarrow2A=2\left(1+2+2^2+...+2^{2022}\right)\)
\(\Rightarrow2A=2+2^3+2^4+...+2^{2023}\)
\(\Rightarrow2A-A=\left(2+2^2+2^3+...+2^{2023}\right)-\left(1+2+2^2+...+2^{2022}\right)\)
\(\Rightarrow A=2^{2023}-1\)
Ta thấy: \(2^{2023}-1=2^{2023}-1\)
Vậy: \(A=B\)