Given :
- The 8 grade class is selling pennants and flags.
- They earn $1 for each pennant
- sold and $6 for each flag sold.
-  They sell 50 items and earn $115. 
To Find :
- How many pennants and how many flags did they sell?
Solution :- 
Let us take that ,
→ number of flags sold = f 
→ number of pennant sold = p 
Money earned by selling flags 
→ Money = $6 * f = $6f 
Money earned by selling pennants
→ Money = $1*p = $1p 
Total money earned 
→ Total Money = $6f + $1p 
Total items sold 
→ Total items = f + p = 50 . . . . . (i)
According to the question ,
→ 6f + p = 115 . . . . . (ii) 
Solving equations (i) and (ii) ,
On subtracting them ,
→ 6f - f = 115 -50
→ 5f = 65
→ f = 65/5 
→ f = 13 
Substitute this in equation (i) ,
→ 13 + p = 50
→ p = 50 -13 = 37
Hence they sold 13 flags and 37 pennants .
I hope this helps .