Definition of Generating Function says :-
$G(x) = \sum_{n=0}^{\infty }a_{n}x^{n}$
Where $a_{n}$ is called the sequence. So, $<a_{0},a_{1},a_{2},......>$ is the sequence for the generating function.
Here, Sequence $a_{n}$ is defined as $(n+2)(n+1)3^{n}$ where $n=0,1,2,3,........$
So,
$a_{0}=2*1*3^{0}$
$a_{1} = 3*2*3^{1}$
$a_{2}= 4*3*3^{2}$
$a_{3}= 5*4*3^{3}$
$a_{4}=6*5*3^{4}$
$......$
$a_{n}=(n+2)*(n+1)*3^{n}$
Now, According to definition of $G(x),$
$G(x) = a_{0} + a_{1}x + a_{2}x^{2} + a_{3}x^{3} +........+a_{n}x^{n}+............$
$G(x) = 2*1*3^{0} + 3*2*3^{1}x + 4*3*3^{2}x^{2} + 5*4*3^{3}x^{3}+......+(n+2)(n+1)3^{n}x^{n} +......$
$G(x) = 2*1*(3x)^{0} + 3*2*(3x)^{1} + 4*3*(3x)^{2} + 5*4*(3x)^{3}+..$ ---- $Equation (1)$
Now, Multiply the whole equation by $3x$ and write the whole equation be leaving one term. So, It becomes
$3xG(x) =\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; 2*1*(3x)^{1} + 3*2*(3x)^{2} + 4*3*(3x)^{3} + 5*4*(3x)^{4} +....$
Say, It is $Equation (2)$
Now, subtract equation $(2)$ from equation $(1)$ vertically terms by terms. So, after that we will get :-
$(1-3x)G(x) = 2(3x)^{0} + 4*(3x)^{1} + 6*(3x)^{2} + 8*(3x)^{3}+....$--- $Equation(3)$
Now, again multiply by $3x$ in the whole equation$(3)$ and write it by leaving one term of equation(3), So, It becomes :-
$(1-3x)3xG(x) =\;\;\;\;\;\;\;\;\;\; 2*(3x)^{1} + 4*(3x)^{2} + 6*(3x)^{3} + 8*(3x)^{4}+...$--$Equation(4)$
Now, again subtract equation $(4)$ from equation $(3)$ vertically terms by terms. After that we will get:-
$(1-3x)^{2}G(x) =2(3x)^{0} + 2*(3x)^{1} + 2*(3x)^{2} + 2*(3x)^{3}+.......$
So,
$(1-3x)^{2}G(x) = 2\times \frac{1}{(1-3x)}$
$\Rightarrow G(x) = 2\times \frac{1}{(1-3x)^{3}}$
So, $G(x) = 2(1-3x)^{-3}$
Edit (16/03/2022):
We can also use one time saving approach from this comment to eliminate options here.
$a_0 = f(0)$ and $a_1 = f’(0)$
Putting $x=0$ in each option, we get $f(0)$ as
For options a) and b) $f(0) = 3 $ and For options c) and d) $f(0) = 2 $
Since $a_0 = 2$, So, Either (c) is correct or (d) because $a_0 = f(0).$
Now, For check $f’(0)$ for each option
for (c), $f’(0) = -6*3 = -18$
for (d), $f’(0) = -6*-3 = 18$
Since, $a_1= 18 $ and $f’(0) = a_1$.
It means option (d) is correct.