Show that the set of all bounded sequences in $X=\mathbb{R}^\Bbb N$ with the box topology is an open and closed set.
I thought of two ways of how to approach this. First one was to note that this set is $$S=\{(x_n)_{n \in \Bbb N} : |x_n| < M, \forall n \in \Bbb N\}$$ for some $M$ a natural number. Now since $|x_n| < M \iff - M < x_n < M$ I can say that $$S=\{(x_n)_{n \in \Bbb N} : -M< x_n \} \cup \{(x_n)_{n \in \Bbb N} : x_n < M\}$$
And now these sets are the preimages (for all $n$) $$\pi_n^{-1}(-M, \infty) \cup \pi_n^{-1}(-\infty, M)$$ which are both open I think?
Another approach was to and show that if $(x_n)_{n \in \Bbb N} \in A$, then finding an open set $U$ in $A$ such that for any $y_n \in U$ we have that $y_n \in A$.
I think that this one would be the correct approach as the former does not use that fact that we're assuming the box topology.
A basic open set (w.r.t box topology) in $A$ is of the form $$\prod_{n \in \Bbb N}U_n$$ with $U_n$ being open in $A_n$ (assuming $A = \prod_{n \in \Bbb N} A_n)$. And $U_n$ is open in $A_n$ if and only if $U_n = V_n \cap A_n$ for $V_n$ open in $X_n$.
So the basic open set is of form $$\prod_{n \in \Bbb N}(O_n \cap A_n)$$
How can I find such a set which satisfies the wanted property?
Your first approach doesn't really work. The first problem is that the set $S$ you define is not the set of bounded sequences. Rather, it is the set of sequences bounded by $M$. A second problem occurs in your second equality, where the $\cup$ should be a $\cap$. Finally, you find $$\bigcap_{n\in\mathbb{N}}\left(\pi_{n}^{-1}(-M,\infty)\cap \pi_{n}^{-1}(\infty,M)\right)$$ but this need not a priori be open, as it is an infinite intersection of open sets.
A good approach would be to show that a sequence $(x_{n})_{n\in\mathbb{N}}$ is bounded if and only if sequences that are 'close by' are also bounded. For example, let $U_{i}$ be a small open ball around $x_{i}$. Then $U=\prod U_{i}$ is an open ball around $(x_{n})_{n\in\mathbb{N}}$. Can you show that any sequence in $U$ is bounded?