The building blocks of geometry would be point line and plane.
The inclusion/exclusion principle states that

That is, the union has as many members as the sum of the number of members of the individual sets, minus the number of elements contained in both sets (to avoid double-counting).
Therefore,

will have the most elements when the sets

and

are disjoint, i.e.

, which would mean the most we can can in this case would be

(Note that

denotes the cardinality of the set

.)
You could find the need of pine board by finding the perimeter of the frame. But first you need to equalize the units, because one of them is in feet and the other one is in inches.
18 inches = 18/12 feet
18 inches = 1.5 feet
perimeter = l + w + l + w
perimeter = 2 + 1.5 + 2 + 1.5
perimeter = 7
The perimeter is equal to 7 feet, therefore Carl needs 7 feet of pine board