\(B=3^{100}-3^{99}+...+3^2-3+1\)
\(3B=3\left(3^{100}-3^{99}+...+3^2-3+1\right)\)
\(3B=3^{101}-3^{100}+...+3^3-3^2+3\)
\(3B+B=\left(3^{101}-3^{100}+...+3^3-3^2+3\right)+\left(3^{100}-3^{99}+...+3^2-3+1\right)\)
\(4B=3^{101}+1\Rightarrow B=\frac{3^{101}+1}{4}\)