Proof (by contradiction). Suppose $x_n$ converges to $L \in \mathbb{R}$ with $x_n \leq B$ for all $n \in \mathbb{N}$ and that $\lim_{n\to\infty} x_n = L > B$. Then, since $x_n$ converges to $L > B$, it follows that $(\forall \varepsilon > 0)$ $(\exists N\in \mathbb{N})$($\forall n\in \mathbb{N}$) $(n\geq N \Longrightarrow |x_n - L| < L -B)$. (I am allowed to choose an epsilon that makes this work since $x_n$ is a convergent sequence). Since $|x_n - L| < L -B$, it follows that $-(L-B) < x_n - L < (L-B)$. Therefore, $B < x_n < 2L-B$. This is a contradiction. Since we assumed that $x_n \leq B$ for all $n\in \mathbb{N}$. Therefore it must be the case that $\lim_{n\to\infty} x_n = L \leq B$.
I am not super confident in this proof. Let me know what you think of the proof and what could be improved.
For the sake of curiosity, you can prove a more general result which states:
Proof
According to the definition of limit, for every $\varepsilon > 0$ there is a natural number $N_{1}\geq 1$ such that \begin{align*} n\geq N_{1} \Rightarrow |a_{n} - a|\leq \varepsilon \Rightarrow a - \varepsilon \leq a_{n} \leq a + \varepsilon \end{align*} Similarly, for every $\varepsilon$, there is a natural number $N_{2}\geq 1$ such that \begin{align*} n\geq N_{2} \Rightarrow |b_{n} - b| \leq \varepsilon \Rightarrow b - \varepsilon \leq b_{n} \leq b + \varepsilon \end{align*}
Consequently, based on the given hypothesis as well as on the fact that for every $\varepsilon > 0$, there is a natural number $N = \max\{N_{1},N_{2}\}$ satisfying \begin{align*} a - \varepsilon \leq a_{n} \leq b_{n} \leq b + \varepsilon \Rightarrow b - a + 2\varepsilon > 0 \end{align*}
we can suppose that that $a > b$. Hence we can choose $\displaystyle\varepsilon = \frac{a - b}{3}$, from whence we get that \begin{align*} b - a + \frac{2(a-b)}{3} = \frac{3(b-a) + 2(a-b)}{3} = \frac{b-a}{3} < 0 \end{align*} which contradicts our assumption. Therefore the proposed result holds.
Hopefully this helps.