Let's call one pack of gum X.
The ratio of # of cherry to # of grape is .(2030=23) Using this, we have the following equality.
(20−X30=2030+5X). The ratio to the left is the ratio of gum if chewman loses 1 pack of cherry, and the ratio to the right is the ratio of gum if chewman finds 5 packs of grape.
Cross multiplying, we have (20−X)(30+5X)=(20)(30)⇒(20−X)(30+5X)=600. Factoring, we have −5x2+70x+600=600⇒−5x2+70x=0⇒5x2=70x⇒x=14.
There are 14 pieces of gum in one pack of gum.