Suppose that the function g satisfies g(x) = 2x − 4 for all real numbers x and that g −1 is the inverse function of g. Suppose that the function f satisfies g(f(g −1 (x))) = 2x 2 + 16x + 26 for all real numbers x. What is the value of f(π)?

I got to this step: f ((x + 4)/2) = (x + 4)^2 − 1

In answer key it says

Thus, we can replace (x + 4)/2 with π, which is equivalent to replacing x + 4 with 2π

why can we replace x+4 with 2π?

That is easy!

substuition method, Let (x+4)/2 = pai , so x+4 = 2pai

f (pai) = (2pai)^2-1