If f(x) = 2x + 1 and we need f(2) we would replace the x in the function with the number 2 because 2 is the domain of the function , so f(2) would become,
f(2) = 2(2) + 1
f(2) = 4 + 1 = 5
Now the question is what is f(g(x)) in this case the domain of the function is g(x). In simpler words we replace x with the function g(x) so here goes,