Answer:
Step-by-step explanation:
Price assuming he bought all large flags: [tex]20*8=160[/tex]
Amount of money more: [tex]160-112=48[/tex]
Difference of price in both flags: [tex]20-12=8[/tex]
Medium Flags: [tex]48\div8=6[/tex]
Large Flags: [tex]8-6=2[/tex]
----------------------------------
The reason why this works, is because the amount of money more comes from the difference between both flags.