Answer
$$g=-5\quad \mathrm{or}\quad \:g=9$$
Work Step by Step
Since the value inside the absolute value can be positive or negative and get the same number, we must consider both options. Doing this, we find:
$$\left|g-2\right|=7 \\ g-2=-7\quad \mathrm{or}\quad \:g-2=7 \\ g=-5\quad \mathrm{or}\quad \:g=9$$