we bought 85 hats at the store . blue hats cost $ 6 and green hats cost $ 7 . the total price was $ 530 . how many green hats did we buy ?
let b be the number of blue hats and let g be the number of green hats . b + g = 85 . b = 85 - g . 6 b + 7 g = 530 . 6 ( 85 - g ) + 7 g = 530 . 510 - 6 g + 7 g = 530 . g = 530 - 510 = 20 . the answer is b .
subtract(530, multiply(85, 6))