A drummer and a guitarist each wrote songs for their band. The number of songs the guitarist wrote minus twice the number of songs the drummer wrote is 8. They wrote a total of 46 songs.

g = songs guitarist wrote
d = songs guitarist wrote