The Borel $\sigma$-algebra on the reals is the smallest $\sigma $-algebra that contains all the open sets. It's a very large class of subsets of reals and it is very difficult to understand in its entirety. Luckily, you don't need to understand each and every Borel set. It suffices to be able to reason about certain sets that interest you. So, the interval $(\pi, 9)$ is an open set, and therefore is an element of any $\sigma $-algebra which contains the open sets. In other words, $(\pi, 9)$ is a Borel set. As for $[2,6]$, remember that any $\sigma$-algebra is closed under taking complements. So, if you can show that $(\infty, 2)\cup (6,\infty )$ is a Borel set, then it would follow that so if its complement, i.e., $[2,6]$. Can you do that now?