How do you solve -8g + 7= 47?

the answer is $g = - 5$
$- 8 g + 7 = 47$
subtract $7$ to both sides
$- 8 g = 40$
divide $- 8$ to both sides
$g = - 5$