Ouch, zarito. I really don't like that the textbook highlights formulae for specific problems, and not general cases. It is fairly straightforward to derive the general case from 5.1.4 and 5.1.5. The problem does ask to show the derivations though, so I began from 5.1.2 and 5.1.3 on the previous page. Taking a look at 5.1.4, we know beta = 3, but there is an 8 and a 9 in the formula.
So, ask yourself, how does one derive 8 and 9 from 3?
8 = 3^2 - 1
9 = 3^2
This should very simply solve your dilema. If you would like to follow the 5.1.2 and 5.1.3 route, it involves geometic series, which also simplify very nicely. Best of luck!
RDH