Let x be the number of hours worked.
If Alani works less than 40 hours, then she earns $8 per hour. So if she works 0 ≤ x < 40 hours, she would make ($8/hr)×(x hr) = $8x.
If she works more than 40 hours, her pay increases to $12 per hour. So if she works 40 ≤ x hours, she would make ($12/hr)×(x hr) = $12x.
Let f(x) be the amount of money ($) she makes after working x hours in a given week. Then f(x) is given by the piecewise function,