Correctness of asymptotic expression from exact expression
What you wrote is correct under the assumption that $|\Gamma|$ and $|Q|$ are constant (which, from the context, is indeed the case), but can be taken a bit further, and can be made more explicit:

For every $x&gt;0$ it holds that $x=2^{\log x}$. Therefore you get

$$f(n)|Q||\Gamma|^{f(n)}=2^{\log f(n)}2^{\log |Q|}2^{f(n)\log |\Gamma|}=
2^{\log f(n)+\log |Q|+f(n)\log |\Gamma|}=2^{O(f(n))}$$

which is somewhat cleaner.