In order to solve for a specific variable, we must "Isolate" the variable.
[tex]g=x-c+y\\g+c=x+y\\g+c-y=x[/tex]
The answer is g+c-y=x