each term in a binomial expansion is of the form ...
In this case, ... the value of will be such that the variable factors cancel.
your book is not the sole source of knowledge. seek and ye shall find ...
Binomial Theorem (part 1) | Precalculus | Khan Academy
A constant terms comes out when a^n-k * b^k is a constant, and does not involve any variables. In your case, the binomial expansion has only one variable, x. That means, in (3x^6)^n - k * (5/x)^k does not contain any x. For it to happen, when n = 21, you need to equate the power of x to zero, since x^0 = 1, is a constant, and other powers yield terms with x, and so, not a constant term.
(x^6)^21 - k * (1/x)^k = x^0
(x^6)^21 - k * (x^-1)^k = x^0
(x^6)^21 - k * x^-k = x^0
x^(6(21-k) - k) = x^0
Equating coefficients, you get k = 18, which is what he used to get the constant term above.
Salahuddin
Maths online