I've been trying to solve this practice problem. I'm having problems with (a) and (b). I did (b) first, finding out generating functions for B(x), C(x) and D(x). I got the following:
B(x) = 1/(1-x)
C(x) = (1-x^3)/(1-x)^2
D(x) = x/(1-x)^2
However, I don't know how to express these as functions of bn, cn, and dn in part (a) of the problem. Thanks for your help

hint for (a)
$$a_0=2=1+1+2×0=$$ $$b_0+c_0+2d_0$$ and $$a_2=4=1+1+2×1=$$ $$b_1+c_1+2d_1$$
for $n>1,$ $$a_n=1+2n=1+0+2×n=$$ $$b_n+c_n+2d_n $$
which is also true for $n=0,1$.