Let n represent the number of nights
Cost to travel to Bali:
[tex]C\text{ = 967 + 58n}[/tex]The cost of flight is constant so we simply add it to the cost of hostel per night times the number of nights
Cost to travel to Paris:
[tex]C\text{ = 534 + 255n}[/tex]