A drummer and a guitarist each wrote songs for their band. The guitarist wrote 10 fewer than twice the number of songs that the drummer wrote. They wrote a total of 50 songs. Write the system of equations that models this situation if the drummer wrote d songs and the guitarist wrote g songs.