Integration by Substitution

$\displaystyle

\int 5\cos(5x) dx

$

$\displaystyle

g'(x) = 5, f(g(x)) = cos5x

$

$\displaystyle

\int (cos5x)(5) dx

$

$\displaystyle

(1/5) \sin5x + C

$

Those are my steps above, but the book says the answer is sin5x. It seems like it got (1/5)*sin5x*5 after integrating and then canceled the 5 and 1/5, but I thought that $\displaystyle \int f(g(x))g'(x) = F(g(x)) + C $, which to me means that you drop the g'(x) and find the antiderivative of f(g(x)). My other thought is that I just find the antiderivative of f(u), which would be cosu in this case, which yields sinu + C. Am I correct?