We make a system of equations from the statement
Alexa will earn $20 every time one of her songs is played in a commercial and she will $110 every time one of her songs is played in a movie.
where T is the total earned, c the number of commercials and m the number of movies
Alexa earned a total of $340 in 8 commercials and movies
we replace the total (340) on the first equation and make and equation for the total of commercials and movies
it is our system