Rearrange x=3g+2 to make g the subject
Subtract 3g from both sides then subtract x on both sides and you have your answer.
x = 3g + 2x - 2 = 3gso: g = (x - 2)/3 = x/3 - 2/3