Piecewise function

Piecewise function
You rent inline skates ta rate of $6 for the firs5 hour and $2 for each additional hour. Assume you can rent skates for up to 5 hrs?

Write a step function that represents the relationship between the number of hours x and the total cost of skates.