Let's first have a look at the admission fee, which is $6,- per person.
This makes a total of $12,-
(Since 6 x 2 = 12).
Next up, the ride at the carnival. This costs c dollars.
This makes a total of 14c
(Since they have made a total of 14 rides (7 each), and we multiply it by 'c')
Finally the game boots, which costs g dollars a game.
Denise and Stacey played a total of 5 games, hence the total cost of the boots will be 5g.
The total cost will therefore be: 14c + 5g + 12
This makes the fourth answer (in your question) the correct answer.