you can group all the x together and then factor out x and then divide.
g = (x-c)/x
multiply both sides by x and u get
gx = x - c
move all x terms together... subtract x from both sides
gx - x = -c
factor out x via reverse distributive property
x(g-1) = -c
divide both sides by g-1
x = -c/(g-1)
if you want to make it look like the other answer (they are both equivalent), if you factor out a negative 1 from the denominator, you get
