In a lecture, we had the following integrals: 
Now, I don't unterstand yet how we can simply substitute $\omega_D$ in the upper integral limit for $x_D$, since $$\omega_D = \frac{k_B T x_D}{\hbar},$$ so I thought the second integral would have to read $$\frac{9R}{\omega^3_D}\frac{k_B^3T^3}{\hbar^3}\int_{0}^{\frac{k_B T x_D}{\hbar}}\frac{x^4e^x}{\left( e^x-1\right)^2},$$ which is not the case, though. Clarification would be appreciated. :-)
You are changing variable in the first integral, setting $x = \frac{\hbar \omega}{k_B T}, dx = \frac{\hbar}{k_B T} d\omega$.
To determine the new limits of integration, you observe that: $$\omega = 0 \implies x = 0$$ and $$\omega = \omega_D \implies x = \frac{\hbar \omega_D}{k_B T}$$
So the upper limit of integration becomes $\frac{\hbar \omega_D}{k_B T}$, which you define as $x_D$.