How is this correct?
$$\hbar\omega e^{iHt/\hbar}\left(a_S^{\dagger}a_S+\frac{1}{2}\right)e^{-iHt/\hbar}=\hbar\omega\left(e^{iHt/\hbar}a_S^{\dagger}a_Se^{-iHt/\hbar}+\frac{1}{2}\right)$$
Source: http://web.physics.ucsb.edu/~dfolsom/PHYS115C/HW_4_solutions_sebastian.pdf
Ignoring all of the ugly symbols and replacing them with simpler ones... your question boils down to asking why
$$e^x\left(a+\frac{1}{2}\right)e^{-x} = \left(e^x a e^{-x} + \frac{1}{2}\right)$$
To see this, apply distributivity on the left to get
$$e^x\left(a+\frac{1}{2}\right)e^{-x}=\left(e^x a + e^x\frac{1}{2}\right)e^{-x}$$
Next, apply distributivity on the right to get
$$\left(e^x a + e^x\frac{1}{2}\right)e^{-x} = \left(e^x ae^{-x} + e^x\frac{1}{2}e^{-x}\right)$$
Now, remember that $\frac{1}{2}$ is just a scalar number and so multiplication with a scalar commutes so $e^x\times\dfrac{1}{2}\times e^{-x}=e^x\times e^{-x}\times\dfrac{1}{2}$
Now, remember that $e^x\times e^y = e^{x+y}$ to see that $e^x\times e^{-x}=e^0=1$ and have the $e^{x}$ and $e^{-x}$ next to the $\frac{1}{2}$ cancel eachother out which gives the desired result.