Rearrange x = 3g + 2 to make g the subject.