Regarding this question: The $\sigma$-algebra generated by all projections is not contained in the $\sigma$-algebra generated by the first $n$ projections
I have two problems regarding the above question, and I would appreciate some help in solving them.
Firstly, how would one prove (using the notations from the question), that $$\sigma (\{\pi_1, \cdots, \pi_n \}) = \sigma ( \{ p_n \}), \forall n? $$
I would begin by noting that $$\sigma (\{p_n \}) = \{p_n^{-1}(U) \ \mid \ U \subset B^n \}. $$
Then, for every $V \subset B$, we have that $$\pi_i^{-1}(V) = \{(x_k)_k \in B^\mathbb{N} \mid \ x_i \in V \}, \forall i \in \{1,2, \cdots, n \},$$ so, for a fixed $i$, by letting $E = B^{i-1} \times V \times B^{n-i},$ we have that $$ p_n^{-1}(E) = \{(x_k)_k \in B^\mathbb{N} \ \mid \ (x_1, \cdots, x_n) \in E \} = \{(x_k)_k \in B^\mathbb{N} \ \mid \ x_i \in V \} = \pi_i^{-1}(V),$$ so $\pi_i^{-1}(V) \in \sigma (\{p_n \})$ and thus $$\sigma (\{\pi_1, \cdots, \pi_n \}) \subset \sigma ( \{ p_n \}), \forall n. $$
However, I do not know how to prove the reverse inclusion, because I have not been able to find a way to write $p_n^{-1}(U)$ for some $U \subset B^n$ as an element of the $\sigma$-algebra generated by $\pi_1, \pi_2, \cdots, \pi_n$.
Secondly, regarding the accepted answer, I do not understand why $$A = \bigcup_{i=1}^\infty \bigcap_{k=i}^\infty \pi_k^{-1}(\{a \})$$ satisfies the required properties.
Of course we have that $A \in \mathcal{A}$ by definition. Moreover, again, by definiton, we have that for every positive integer $k, \pi_k^{-1}(\{a \}) \in \mathcal{A}_k$ and $\pi_{k+i}^{-1}(\{a \}) \notin \mathcal{A}_k$, for every positive integer $i$.
The above facts imply that, if there would be an $N$ such that $A \in \mathcal{A}_N$, then $$\bigcap_{k=N+i}^\infty \pi_{k}^{-1}(\{a \}) \notin \mathcal{A}_N, $$ for every positive integer $i$. However, is this enough to conclude that $$ A = \bigcup_{i=1}^\infty \bigcap_{k=i}^\infty \pi_k^{-1}(\{a \}) \notin \mathcal{A}_N? $$
Answer on first part of your question.
Let me introduce the projections $\rho_{i}:B^{n}\to B$ prescribed by $\left(b_{1},\dots,b_{n}\right)\mapsto b_{i}$.
Space $B^{n}$ is equipped with $\sigma$-algebra $\wp\left(B^{n}\right)$ but it is not difficult to prove that $\wp\left(B^{n}\right)=\sigma\left(\left\{ \rho_{1},\dots,\rho_{n}\right\} \right)$.
That means that a function $f:Y\to B^{n}$ is measurable if and only if $\rho_{i}\circ f$ is measurable for $i=1,\dots,n$.
Applying this on $p_{n}:X\to B^{n}$ we then find that $p_{n}$ is measurable if and only if $\pi_{i}=\rho_{i}\circ p_{n}:X\to B$ is measurable for every $i\in\left\{ 1,\dots,n\right\} $.
This means exactly that $\sigma\left(\left\{ p_{n}\right\} \right)=\sigma\left(\left\{ \pi_{1},\dots,\pi_{n}\right\} \right)$.
Answer on second part of your question.
let $A=\bigcup_{i=1}^{\infty}\bigcap_{k=i}^{\infty}\pi_{k}^{-1}\left(\left\{ a\right\} \right)$ and assume that $A\in\mathcal{A}_{n}$ for some $n$, so that $A=p_{n}^{-1}\left(U\right)$ for some $U$ showing that for a sequence $\left(a_{1},a_{2},\dots\right)\in A$ there are only conditions on the first $n$ coördinates.
In other terms: if $\left(a_{1},a_{2},\dots\right)\in A$ and for sequence $\left(b_{1},b_{2},\dots\right)$ we have $a_{i}=b_{i}$ for $i=1,\dots,n$ then also $\left(b_{1},b_{2},\dots\right)\in A$, no matter what values are taken by the $b_{i}$ with $i>n$.
However the sequence $\left(a_{1},a_{2},\dots,a_{n},a,b,a,b,a,b,\dots\right)$ where $a$ and $b$ keep alternating cannot be an element of $A$.
This because for any sequence $\left(b_{1},b_{2},\dots\right)$ that is an element of $A$ there exists an index $i$ with $j>i\implies b_{j}=a$.
A contradiction is found and proved is now that $A\notin\mathcal{A}_{n}$ and this works for every $n$.