Please check the attachment. Now I only know how to find the volume of the pyramid, that's 1/3 Ah and surface area is sum of area of triangles + sum of base square.

I think I can do the differentiation part in the question but I need help with the earlier part.