Calculating ratio of conjugate base and acid when pH and pKa are given
Recall the fundamental properties of the logarithm 
$$+\log \left(\frac{a}{b}\right)$$

is the same as

$$-\log \left(\frac{b}{a}\right)$$

so Henderson Hasselbach can have plus or minus signs. The correct equation is

$$\mathrm{pH} = \mathrm{p}K_\mathrm{a} + \log \left(\frac{\text{conjugate base}}{\text{acid}}\right)$$

or 

$$\mathrm{pH}  = \mathrm{p}K_\mathrm{a} - \log \left(\frac{\text{acid}}{\text{conjugate base}}\right)$$

Now sort out whether the textbook solution is right or not.