All you have to do is subtract 18 from 45 and divide that sum by 3, because 3 bags of birdseed were bought. If she spent $45, then 18 dollars were spent on a birdfeeder and three bags of birdseed costs $27 all together. 27 divided by 3 is 9, so each bag of birdseed costed $9. :)