First, of all you can't graph f itself- it is not a function! In particular, from the first line, f(-1)= -1-1= -2 while, from the second line, f(-1)= -1+ 1= 0. One of those should be "<" rather than "\le". I will assume one of each of those is "<" but you will have to determine exactly which point goes in which interval.
Also, do you mean (1/2)(x+2) or 1/(2(x+2))? I will assume the former.
f(x) is "piecewise linear" and the argument of f, (1/2)(x+2) is linear so you can just determine for what values of x, in (1/2)(x+2) give a value in each of the intervals used in defining f(x).
If (1/2)(x+ 2)= -4, then x+ 2= -8 so x= -10. If (1/2)(x+ 2)= -1, then x+ 2= -2 so x= -4. Since everything is linear here, g(-10)= 3f(-4)-2= 3(-5)- 2= -17 while g(-4)= 3f(-1)- 2= 3(-2)- 2= -8. The first part of the graph of g(x) is a straight line from (-10, -17) to (-4, -8).
As before, x= -4 gives (1/2)(x+ 2)= -1 and, here, f(-1)= 0. so g(-4)= 3(0)- 2= -2. If (1/2)(x+ 2)= 0, then x+ 2= 0 so x= -2. g(-2)= 3f(0)- 2= 1. The next part of the graph of g is the straight line from (-4, -2) to (-2, 1).
As before, x= -2 gives (1/2)(x+ 2)= 0 and, here, g(-2)= 3f(0)- 2= 3(1)- 2= 1 also. (1/2)(x+ 2)= 4 gives x+ 2= 8 so x= 6. g(6)= 3f(4)- 2= 3(-3)-2= -11. The final part of the graph of g is the straight line from (-2, 1) to (6, -11).