We can represent the total number of people who live in the city with the variable 'p'
20% is 0.2 in decimal form, so 20% of the people who live in the city can be represented as 0.2p.
Since 20% of people in city bought pizza, and 4500 people bought pizza, we can form an equation:
0.2p = 4500
Multiply both sides by 10 in order to get rid of the decimal (It's not necessary, but sure does make the calculation less confusing!):
0.2p * 10 = 4500 * 10
2p = 45000
p = 22500
22,500 people lived in the city.