James bought 5 boxes of cookies and 2 cakes at the store for his party. The cakes cost $4 each and his total bill was $28.50, how much was each box of cookies?