You're going to have to "build up" your answer, recursively. These functions are defined recursively. I would try this: construct a table with columns x, f(x), g(x), and h(x). Then just start marching across the rows until you have finished out the x = 4 row. The last number in the h column will be your answer.