This is kind of a start at the end question. Wherein you solve the problem backwards. First she had 9 muffins:


Meaning that 9 is the one-third or the 33.33% of the original, so:
NV(the remaining)=Percentage x Original
9=\frac{1}{3} x Original
Divide both sides by one-third

now before she gave the two-third of the muffins to her niece, she has 27 pcs left.. but there is another problem, she gave 1/10 of muffins to her children that resulted to 27 pcs left... therefore we do it again:
meaning 27 is the nine-tenth value of the original so lets do what we did earlier by substituting it in the equation, 
NV=Percentage x Original
27=\frac{1}{10} x Original
Divide both sides by one-tenth

She had 30 muffins baked before she gave it to the kids and to her nieces. Hope this helps =)