So we represent the number of cookies as C
and the number of girls as x
[tex]C-5x=14[/tex].........1
[tex]C-9x=-14[/tex]........2
1+2= [tex]2C-14x=0[/tex]
[tex]2C=14x[/tex]
[tex]C=7x[/tex]
substitute
[tex]7x-5x=14[/tex]
[tex]2x=14[/tex]
[tex]x=7 [/tex]
There are 7 girls