Generating function for counting problem. How many 3 letter words can be formed using the letters of the word “TESTBOOK”?
I'm clueless to solve this question using generating function, can anyone please help me or at least provide some hint. 

The generating function is $f(z)=\left(1+z+\frac{z^2}{2!}\right)^2\cdot (1+z)^4$
The first two factors represent $t$ and $o$. The other four factors represent $e,x,b,k$
If you expand it you get:
$f(z)=1+\frac{6}{1!}z+\frac{32}{2!}z^2+\frac{150}{3!}z^3+\frac{606}{4!}z^4+...$
There can be formed $6$ words with $1$ letter. $32$ words with $2$ letters. And $150$ words with $3$ letters.  
