Let the number of hours she spent in baby- sitting is x
and the number of hours she spent in music lessons is y.
Now, we have been given that she worked a total of 18 hours. Hence, we have
[tex]x+y=18\\ y=18-x...............................(1)[/tex]
And she made $139. Thus, we have
[tex]5x+12y=139..............................(2)[/tex]
Substituting the value of y from equation 1 in 2, we get
[tex]5x+12(18-x)=139\\ 5x+216-12x=139\\ -7x=-77\\ x=11[/tex]
Therefore, she spent 11 hours in baby-sitting.