\(A=\)\(1+5+5^2+5^3+...+5^{1998}\)
\(5A=5+5^2+5^3+5^4+...+5^{1999}\)
\(5A-A=\left(5+5^2+5^3+5^4+...+5^{1999}\right)-\left(1+5+5^2+5^3+...+5^{1998}\right)\)
\(4A=5^{1999}-1\)
\(\Rightarrow A=\frac{5^{1999}-1}{4}\)
\(B=4+4^2+4^3+...+4^n\)
\(4B=4^2+4^3+4^4+...+4^{n+1}\)
\(4B-B=\left(4^2+4^3+4^4+...+4^{n+1}\right)-\left(4+4^2+4^3+...+4^n\right)\)
\(3B=4^{n+1}-4\)
\(\Rightarrow B=\frac{4^{n+1}-4}{3}\)