Find the answer to the math problem: Tilly needs to sell 100 bags at $10 per bag to make $300 in profit. How much did she buy each bag for?