I am going through an integration requiring a u-substitution on a practice midterm, and the professor posted a solution which used:
u = x - 2
u - 2 = x
du = xdx
I am confused how du could be anything other than dx? From what I understand, the derivative of u - 2 and the derivative of u are identical. The way he did this was key to how he solved the problem. Here's the solution:

Note that $$u=x+2 \implies \frac d{dx} (u)=\frac d{dx}(x+2) \implies \frac{du}{dx}=1\implies du=dx$$
What was written above in your book's solution ($du=x\,dx$) may be a typo.