To get the answer we can make equations
Lets assume that number of pumpkins sold.
5*x - its how much seller get for the pumpkins
3*6*x - its how much selleg get for the squasches.
Now we can create equation
5x+3*6*x=98
5x+18x=98
23x=98 /:23 divide both sides by 23
x=98:23
x=4,26 ~ 4 - pumpkins
6*4.26=25.56~ 26 squashes