Number of small bags = x
Number of large bags = y
x + 3y = 447
x + y = 271
Subtract the second equation from the first to get
2y = 176
y = 88
x = 183
I'm assuming you meant to say 'How many small/large bags did they sell?'
So....
183 small bags and 88 large bags