If she works 40 hours or less then she earns 20x dollars.
If she works more than 40 hours, then she earns 20×40 dollars for the first 40 hours and 30×(x-40) dollars for every hour over 40 hours. The number of hours over 40 hours is x-40.
[tex]f(x)= \left \{ {{20x,x \leq 40} \atop {40\times20+30(x-40),x\ \textgreater \ 40} \right. [/tex]