quadratic function application

I came here about a month ago asking a question and you guys were very helpful. Now, I need help again. These questions are part of a project, but the questions deal with quad. functions/optimization:

*1) You want to fence off a rectangular garden plot by putting a short brick wall along one edge and wooden fencing along the other three edges. The brick wall will cost $8 per linear foot, while the wooden fence costs $2 per linear foot.*

a) Find a function that gives the total cost of the material in terms of the variable **l** and **w**; ignore the thickness of the brick.

b) If you have only $500 to spend on materials, what are the dimensions of the largest (biggest area) plot you can enclose?

And the second:

*2) A box is made from a 16 inch by 28 inch piece of cardboard by cutting equal squares from each corner and folding up the sides.*

a) Write a function expressing the volume of the box as a function of x.

b) Determine the domain of this function

c) Determine the size of the square that will produce a maximum volume for the box. Give a complete explanation of your solution.

I understand it's a lot, but I would appreciate any sort of help. I'm really struggling with this. Thanks.

- Paul