The cost s $80 a night for the first two nights. Therefore the total cost is
T(x) = 80x, x ≤ 2
The cost is $60 a night for each additional night after 2 nights. Therefore
T(x) = 80x + 60(x-2)
= 140x - 120, x > 2
Answer:
The piecewise function for the total cost is
T(x) = 80x, x ≤ 2,
= 140x - 120, x > 2