Let's start by assigning variables to the numbers we want to find. m for muffins and c for cupcakes. Let's say the first selling statement takes a days, the second one takes b days.
m = 300 + 60a
c = 30a
m = 930 + 30b
c = 60b
Ok let's combine the first two equations so that a disappears:
2c = 60a
m = 300 + 2c
Now let's combine the last two equations so that b disappears:
c/2 = 30b
m = 930 + c/2
Now combine these results such that m disappears:
300 + 2c = 930 + c/2
... and simplify
3/2c = 630 => c = 420
m = 300 + 2*420 = 1140
So there were 420 cupcakes and 1140 muffins.
a = 14 days, and b = 7 days, but that was not asked.