Production function and isoquant slope
The book is right. The proper way to go about this is of course to work out the theory and the math before plugging in any specific numbers. Fixing the quantity produced, we have 
$$ \bar Q = L^bK^a \implies K = (\bar Q)^{1/a}L^{-b/a}$$

Then, since capital is on the vertical axis

$$\frac {dK}{dL} = -\frac{b}{a}(\bar Q)^{1/a}L^{(-b/a)-1} $$

Note that we do not differentiate $\bar Q$ since we want it to be fixed, for different combinations of inputs.

Inserting the production function expression

$$\frac {dK}{dL}= -\frac{b}{a}[L^bK^a]^{1/a}L^{(-b/a)-1}$$

$$\implies \frac {dK}{dL}= -\frac{b}{a}\frac{K}{L}$$ 

Then, plug in the specific numbers: $b=1/3, a=3/4, K = 40, L = 20$ so

$$\frac {dK}{dL} = -\frac{1/3}{3/4}\frac{40}{20} = -\frac{4}{9}\cdot 2 = -\frac{8}{9}$$