A vegetable gardener has a tilled piece of soil that measures 6 yards by 12 yards. She wants to put a border of marigolds of the same width within the four sides and leave an area of 40 square yards for vegetables. How wide can the border be?

the area of the border is the total area less the vegetable area, so

if the border has width x, then you need
6*12 - (6-2x)(12-2x) = 40
now just solve for x as usual