The key is to design the spreadsheet correctly. Illustrated Projects text before attempting this lab. Your design should include a diagram of what the spreadsheet will look like, and notes about the formulas you'll use. From past experience, the carpenter knows how long it takes to make each item, how much it costs to make each, and how much each sells for. These limits cannot be exceeded, though they need not both be reached.
Optimization problems can be very hard to solve.
There are usually many possibilities to try, and small changes in the input data can result in very different answers. Because optimization problems are so important, they have been studied extensively. A mathematical technique called linear programming can be used to solve problems such as these. You might start with the table listed above. You could add a column in which to enter the number of hours spent on each item.