Simplifying
g(r) = -1 + -7r
Multiply g * r
gr = -1 + -7r
Solving
gr = -1 + -7r
Solving for variable 'g'.
Move all terms containing g to the left, all other terms to the right.
Divide each side by 'r'.
g = -1r-1 + -7
Simplifying
g = -1r-1 + -7
Reorder the terms:
g = -7 + -1r-1
Hope this helped a little!