A real estate office handles an apartment complex with 50 units. when

A real estate office handles an apartment complex with 50 units. When the rent per unit is $580 per month, all 50 units are occupied. However, when the rent is $625 per month, the average number of occupied units drops to 47. Assume that the relationship between the monthly rent p and the demand x is linear.
(a) write the equation of the line giving the demand x in terms of the rent p.