Let c represent cookies and m represent muffins.
1/4 = 8c + 2m
And we know that
M = 3c
Which means
1/4 = 8c + 2(3c)
1/4 = 14c
So if she bought cookies with all her money
4/4 = 56c
Or
1/1 = 56c
Now we want to know how many cookies she can buy with 1/7
So divide each side by 7
1/7 = 8
So that means
2/7 = 16
And now add them altogether
16 + 8 = 24
Therefore, she bought 24 cookies.