Let p and c be the pieces of pie and cake respectively.
We have p+ c= 100 (because the total number of pieces of pie and cake is 100).
On the other hand, we have $4p+ $5c= $473
or 4p+ 5c= 473
p+c=100
4p+5c=473
Solving the set of equations above, we have: p= 27, c=73.
They sold 27 pieces of pie~