I assume the assertion $A, B \in \Bbb S^n$ is to be interpreted as meaning that both $A$ and $B$ are real, symmetric, $n \times n$ matrices. I further assume the assertion that $B \ge 0$, i.e. $B$ is a PSD (positive semidefinite) matrix means that for any real vector $x$, $x^TBx \ge 0$.
Since $A \in \Bbb S^n$, there is an orthogonal matrix $O$, that is,
$OO^T = O^TO = I, \tag 1$
which diagonalizes $A$; we can then set
$O^TAO = \Lambda = \text{diag}(\lambda_1, \lambda_2, \ldots, \lambda_n) = [\lambda_i \delta_{ij}]; \tag 2$
here the $\lambda_i \in \Bbb R$ are of course the eigenvalues of the matrix $A$.
We recall that matrix traces are invariant under similarity transformations such as $A \to O^TAO = O^{-1}AO$; therefore
$\operatorname{tr}(AB) = \text{tr}(O^TABO) = \text{tr} (O^TAOO^TBO), \tag 3$
where we have used (1) on the right of (3); if we write the transformed matrix $O^TBO$ as
$O^TBO = [b_{ij}], \tag 4$
we may combine (2), (3) and (4) and obtain
$\text{tr}(AB) = \text{tr}(O^TAOO^TBO) = \text{tr}(\Lambda [b_{ij}]) = \text{tr}([\lambda_i \delta_{ik}][b_{kj}]) = \text{tr}([\lambda_i b_{ij}]) = \displaystyle \sum_1^n \lambda_i b_{ii}. \tag 5$
Now, since the columns $\vec e_i$ of an orthogonal matrix such as $O$ form an orthonormal set,
$O = [\vec e_1 \; \vec e_2 \; \ldots \: \vec e_n ], \tag 6$
a fact which is manifested in (1), where
$O^T = \begin{bmatrix} \vec e_1^T \\ \vec e_2^T \\ \vdots \\ \vec e_n^T \end{bmatrix}, \tag 7$
we have
$[b_{ij}] = O^TBO = [\vec e_i^TB\vec e_j], \tag 8$
from which it is seen that
$b_{ii} = \vec e_i^T B \vec e_i \ge 0 \tag 9$
since $B$ is positive semidefinite; it follows then that
$\displaystyle \lambda_{min} \sum_1^n b_{ii} = \sum_1^n \lambda_{min} b_{ii} \le \sum_1^n \lambda_i b_{ii} \le \sum_1^n \lambda_{max} b_{ii} = \lambda_{max} \sum_1^n b_{ii}, \tag{10}$
whence
$\lambda_{min} \text{tr}(B) \le \text{tr}(AB) \le \lambda_{max} \text{tr}(B); \tag{11}$