I think the way you did it kind of implies that because of the way you kept your terms in order. The book's method is more correct in my opinion as it notes that the above integral doesn't equal x, but u + C, then back-substitutes x-4 for u and combines all the constants into one C.