Summary
When converting $(201)_3$, specifically, converting the $2$, I am not entirely sure how they select $5$ (from $f(2) = 5$) and not $8$ (from $f(3n+2) = 10f(n)+8$) when doing the radix replacement operation for the recurrence following equation 1.18. My thinking is that it is due to the start of the replacement being done with $\alpha_j$ which, in this case, is $5$. See below for more context.
Details
The following radix independent, generalised recurrence is given as follows (1.17 in book)
$$ \begin{align} f(j) &= \alpha_j,\ \ \text{for}\ 1 \leq j < d; \\ f(dn + j) &= cf(n) + \beta_j,\ \ \text{for}\ 0 \leq j < d\ \text{and}\ \ n \geq 1, \end{align} $$
The above recurrence can then start with numbers in radix $d$ and produce values in radix $c$. So it has the radix changing solution (1.18 in book)
$$ f((b_m b_{m-1} ... b_1 b_0)_d) = (\alpha \beta_m\beta_{b_{m-1}} \beta_{b_{m-2}} ... \beta_{b_1} \beta_{b_0})_c $$
Then, as the book says, by some stroke of luck we're given the recurrence
$$ \begin{align} f(1) &= 34, \\ f(2) &= 5, \\ f(3n) &= 10f(n) + 76,\ \ \text{for}\ \ n \ge 1, \\ f(3n+1) &= 10f(n) - 2,\ \ \text{for}\ \ n \ge 1, \\ f(3n+2) &= 10f(n) + 8,\ \ \text{for}\ \ n \ge 1, \\ \end{align} $$
Then the book proposes computing $f(19)$ where $d = 3$ and $c = 10$ (from 1.17). So $19 = (201)_3$ and the radix-changing solution has us doing a digit-by-digit replacement of 201 so
- $2_3$ becomes $5_{10}$ - this is the bit I'm unsure about. Why is it not $8$? I think because it is the first digit to replace and thus applies to $\alpha_j$. If it where in the middle of the number (e.g. $120$) it may well have been $8$?
- $0_3$ becomes $76$
- $1_3$ becomes $-2$
So tying it all together as radix $10$ we get
$$ f(19) = ((201)_3) = (5 76 -2)_{10} = 500 + 760 -2 = 1258 $$
Being verbose: the final addition is because $500$ is in the radix $10$ "hundreds" column (multiply by $100$), $76$ in the "tens" column (multiply by $10$), and $-2$ in the "ones" column.