An apartment complex in Johannesburg has 90 units. When the monthly rent is $500 per unit, all units are rented. It is believed that for each $10 increase in rent, one apartment unit will become vacant.

if n are vacant then number of units = 90 - n

rent per unit = 500 + 10 n
total rent = y = (500 + 10 n)(90-n) = 45,000 + 400 n - 10 n^2

Now you did not ask a question.
Perhaps you want to know how many units give max income
you can find the vertex of that parabola or find where dy/dn = 0
dy/dn = 0 = 400 - 20 n
n = 20 for max income
which is 70 units * 700 = 49,000