Amira buys cookies and onions at the store. She pays a total of $51.40. She pays a total of $6.18 for the cookies. She buys 7 bags of onions that each cost the same amount. How much does each bag of onions cost?