Answer:
g(x) = |x + 4| - 2
I recommend next time you try substituting the x-values from points the line meets into each function until g(x) matches the y-value. For example, the line/function passes through the point (1, 3). Substitute the x-value: 1 into the function where it says x. That would give you 3 = |1 + 4| - 2. (If you're wondering where I got 3 from g(x) is basically the same as y. Simplify the values in the "||" first. You should then get 3 = 5 - 2. Simplify that and you get 3 = 3 which means g(x) = |x + 4| - 2 is the correct answer. If you were to get anything else other than 3 such as "3 = 4", it would not be correct.