Let us plug-in the values of x to know
> x = 0
f(0) = 3(0) + 1 = 1
g(0) = 3^0 + 1 = 2
> x = 1
f(1) = 3(1) + 1 = 4
g(1) = 3^1 + 1 = 4
> x = 2
f(2) = 3(2) + 1 = 7
g(2) = 3^2 + 1 = 10
> x = 3
f(3) = 3(3) + 1 = 10
g(2) = 3^3 + 1 = 28
Therefore the only answer is:
1