Let number of people who ordered pizza are x and number of people who ordered sandwich are y.
Total number of people =9, that is x+y=9
Total collection by the 9 people=$21.50, that is
1.50x + 2.50y=21.50 .
So we have two equations, which are
x+y=9 , 1.50x +2.50y =21.50
Solving them, we will get
x=1, y=8
So number of people ordered chicken sandwich = 8 .