Let the slate base be x by y. Let the sides have height z. Then the cost function is:
Now start taking partials and then use the Second Derivative test to test for extrema. I did it quick and got and as the extrema. But double check it.