Between 0 and 1 hour (included) the cost is $4
Between 1 and 2 hours (included) the cost is $6
Between 2 and 3 hours (included) the cost is $8
And so on. Then, the function is:
[tex]\begin{gathered} f(x)=\begin{cases}4,0\le x\le1 \\ 6,1And the graph is: