The best way to answer this problem is to set up an equation.
So you know that $39 is the total, so lets say that since she pulled weeds 7 times, we'll let the amount of times represent T so the first step to the equation is to figure out how many times she pulled for less than an hour($5) and more than an hour($6). So that equation can be shown as (Tx$5)+(Tx$6)=$39. This should be a good start for you. It might be easier to try filling T in with different numbers that add up to 7 until the sets equal $39.