Example 5.2 is the risk-free return for the given horizon (half-year here, meaning it is NOT an annualized - it would be 5.42 following the logic of WallStreetMojo that uses annualized rates). Therefore, as written, $T = 1/2$ and $1/T = 2$. This turns the half-yearly return into an annualized return (2.71% -> 5.49%).
The thing to consider is that almost all interest rate quotes (and many other metrics like implied volatilities etc.) are quoted annualized by convention. The next section defines the annual percentage rates, which is what you would usually look at:
$$ APR = n \times r_f(T)$$
and the per period rate (used in the example you highlighted) is given by
$$r_f(T) = T \times APR$$.
It also uses example 5.2 again to show that it is 5.42% (as I wrote above).