A crate has a heigth of 6 feet. The sum of the areas of all 6 sides of the crate is 40 square feet. Express the length l of the crate in terms of the width w (i.e. write l as a function of w).

let the dimensions be l, w, and 6 ft

surface area
= 2lw + 12l + 12w = 40
lw + 6l + 6w = 20
l(w+ 6) = 20-6w
l = (20-6w)/(w+6)