You have the following equation:
5g + h = g
In order to solve for g, you first organize the previous equation, as follow:
5g + h = g substract g both sides and substract h both sides too
5g - g = -h
4g = -h dive by 4 both sides
g = -h/g
Then, the answer is g = -h/g