How can I find this code block's execution time t(n) and big O notation?
fact(n) runs at $O(n)$.
So, each iteration of funcQ2 runs at $O(i)$, assuming log runs at constant time.
(There are several algorithms to calculate the log)
Then the question turns into calculating $\sum_{i=1}^n O(i)$, and the answer is $O(n^2)$.
Now suppose your log(n) runs at time $O(f(n))$.
Then the answer to your question should be $\sum_{i=1}^n O(f(i))$.
You should calculate that on your own as I don't know the $f$.