the line in red is just wrong. g(x + 4) is NOT a product. you do not think of it as g times (x + 4). it is g of (x + 4), it is function notation, you cannot manipulate it as you did.

now when you have g(x + 4), it means you took some function g(x) and shifted it 4 units to the left. so given g(x + 4), we must replace x with x - 4, that way, we have g(x - 4 + 4) = g(x), what we did here was shift the function back to the right. thus we know that to get g from h, we must replace the x in h(x) with x - 4 (essentially what we are doing is shifting the h(x) function to the right to match up with the g(x)).

so, we have:

g(x + 4) = h(x)

replace x everywhere with x - 4, we get:

g(x) = h(x - 4)

=> g(x) = 4(x - 4) - 1

=> g(x) = 4x - 17