At statement, return f(x, c) * x;
In the recursive tree, don't fix the value of x initially. First go through the recursive function call till the base case.
F(5, 5)
|c = 4, x = 6
F(6, 4)
| c = 3, x = 7
F(7, 3)
|c = 2, x = 8
F(8, 2)
| c = 1, x = 9
F(9, 1)
| c = 0, return 1;
Now, x = 9;
F(9, 1) = 1, Multiply it with x now and return. =>9
F(8, 2) = 9, Multiply it with x now and return => 81
........