Explanation:
if we ignore minor details like windows and doors, then the painting areas are
2× 12×8 ft
2× 16×8 ft
and she needs to paint 2 coats, so, all of that has to be doubled.
so, she needs to paint
2×2×12×8 = 384 ft²
2×2×16×8 = 512 ft²
in total
384 + 512 = 896 ft²
1 gallon covers 500 ft².
since she cannot buy a part container, she will have to buy 2 paint containers, that will be enough to cover 1000 ft². so, she will have some paint left.
but she cannot buy less.