Find expressions for the single sums $X$ equivalent to the set of seven payments of Fig. 5-21 at times $(a)1,(b)5,(c)12$ and $(d)12$, assuming a rate $i$ per period.
Solution:
$(a)$ At $1$, $X$ is the discounted value of a deferred annuity with deferment $k=3$ periods. $$X=Ra_{\bar{7}|i}(1+i)^{-3}$$
$(b)$ At $5$, $X$ is the discounted value of an annuity due, $$X=Ra_{\bar{7}|i}(1+i)$$
$(c)$ At $8$, $X$ is the discounted value of an ordinary annuity of $4$ payments and the discounted value of an ordinary annuity of three payments, $$X=Ra_{\bar{4}|i}+Ra_{\bar{3}|i}$$
$(d)$ At $12$, $X$ is the discounted value of an annuity due, $$X=Ra_{\bar{7}|i}(1+i)$$
Where, $$a_{\bar{n}|i} \text{ is called a discount factor for }n \text{ payments, or the discounted value of \$1 per period}$$ $$a_{\bar{n}|i}=\frac{1-(1+i)^{-n}}{i}$$ $$R=\text{ periodic payment of the annuity}$$
Now, My question is how they get the annuity type? For $(a)$ Why the deferment periods are $3$, isn't should be $4?$ Any help will be appreciated.

At time $t = 1$, the first payment of $R$ at $t = 5$ occurs $4$ periods in the future. So if we can either write the present value as an annuity-immediate where the deferral period is $3$ years, or as an annuity-due where the deferral period is $4$ years: $$\require{enclose} X = R v^3 a_{\enclose{actuarial}{7}i} = R v^4 \ddot a_{\enclose{actuarial}{7}i}$$ where $v = 1/(1+i)$ is the periodic present value discount factor. In both cases, the equation of value is $$X = Rv^4 + Rv^5 + \cdots + Rv^{10}.$$
Similarly, at $t = 5$, the present value corresponds to an annuity-due with no deferral, because the first payment occurs at the same time: $$X = R + Rv + Rv^2 + \cdots + Rv^6 = R\ddot a_{\enclose{actuarial}{7}i}.$$
At time $t = 8$, the equation of value is $$X = R(1+i)^3 + R(1+i)^2 + R(1+i) + R + Rv + Rv^2 + Rv^3.$$ This can be written in multiple ways, such as the accumulated value of an annuity-immediate or annuity-due, plus the present value of an annuity-due or annuity-immediate. Or you can accumulate or discount a $7$-period annuity. $$X = Rs_{\enclose{actuarial}{4}i} + Ra_{\enclose{actuarial}{3}i} = R\ddot s_{\enclose{actuarial}{3}i} + R\ddot a_{\enclose{actuarial}{4}i} = R(1+i)^4 a_{\enclose{actuarial}{7}i} = Rv^3 s_{\enclose{actuarial}{7}i} = \cdots$$
A similar principle applies at $t = 12$. Or we can just write it as $$X = R \ddot s_{\enclose{actuarial}{7}i}.$$
Note that the expressions you wrote for parts (c) and (d) are incorrect.