What price will generate the greatest profit for the airline?
Your goal is first to find the demand function, then find the revenue function from that, then finally the profit function.
First look at demand (quantity), as a function of price. The problem tells you first that Q(250) = 5000. It also tells you the rate of change of Q is constant, so that Q is a line with slope -500/5 = -100 tickets per dollar. So
Q(P) = 5000 - 100 (P-250) = 30000 - 100 P.
Now you have the quantity for each price, and that gives you the revenue for each price:
R(P) = P*Q(P) = P(30000 - 100P).
Finally you need the total cost. The cost is 100 * Q, where Q is the number of people who fly. But Q = 30000 - 100 P, so the cost is
C(P) = 100(30000-100P).
Now finally the profit is revenue minus cost:
Profit = R(P) - C(P) = P(30000-100P) - 100(30000-100P) = (P-100)(30000-P).
So all you need to do is find the P that maximizes this quadratic function. You expand it out and either take the derivative or complete the square (depending what course you're in). You get that the maximum occurs when P=200, and the profit at P=200 is ONE MILLION DOLLARS.