let the number of cheap tickets be c

let the number of expensive tickets be e

we have

c + e = 500 .......................(1)

5c + 9e = 3220 ...................(2)

if you don't understand how i got these equations tell me

9c + 9e = 4500 ................(3) = (1)*9

5c + 9e = 3220 ................(2)

=> 4c = 1280 .................(3) - (2)

=> c = 1280/4 = 320

320 cheap tickets were sold