Let x the number the number of pine clock and y be the
number of oak clocks.
We have the following equations:

And we wand to do the maximization of the function:

The solution, which is a graphical one, is at the point of intersection
of the two lines, solving the system we get the solution :
x=8, y=2.
Substituting in the function we get the maximal value:
max(f)=24+8=32.