Finding the linear demand function

Homework Statement

The manager of a 120-room resort hotel has found that, on average, 50 rooms are booked when the price is $100 per night and 80 rooms are booked when the price is$80 per night. Find the demand function, assuming that it is linear, and what price should he charge to maximize revenue?

Homework Equations

So I thought of it as two linear equations, but I don't understand how to obtain the demand function. Is it 100=50-x and 80=80-x? Doesn't seem right to me...

The Attempt at a Solution

Sadly, all the other questions involve a single price, and I don't know how to work with two. Any help would be awesome!