Why is the following operator $A^* B \in L(X)$?

Let $$X$$ Hilbert space. Let $$A \colon D(A) \subset X \to X$$ be the generator of a strongly continuous semigroup of linear bounded operators $$e^{At}$$, so possibly $$A$$ is an unbounded operator. Call $$A^*$$ the adjoint. Let $$B \in \mathcal{L}(X)$$ positive self-adjoint operator, such that $$R(B) \subset D(A^*)$$, ($$R(B)$$ is the range of $$B$$).

Then in [Li, Xungjing, and Jiongmin Yong. Optimal control theory for infinite dimensional systems. 1995] pag 231 it says that $$A^* B \in L(X)$$. Why is that?

I mean $$A$$ is unbounded so $$A^*$$ should be too. But then even if $$B$$ is bounded, this is not enough in my mind to have $$A^* B \in L(X)$$.

If necessary assume that $$A$$ generates a strongly continuous semigroup of contractions since it is an assumption that is made (but it is necessary for other facts so probably it is not required here)

Again if necessary assume for some $$c_{0} \geq 0$$ $$\quad\left\langle A^{*} B x, x\right\rangle \leq c_{0}\langle B x, x\rangle-|x|^{2}, \quad \forall x \in X$$

Since $$A^\ast B$$ is defined everywhere, it suffices to show that it is closed (by the closed graph theorem). So assume that $$x_n\to x$$ and $$A^\ast Bx_n\to y$$. Since $$B$$ is bounded, we have $$B x_n\to B x$$. Moreover, the adjoint of a densely defined operator is closed. Thus $$A^\ast Bx=y$$, and we have shown that $$A^\ast B$$ is closed.