The height is variable and the square base area are variable.
Zero volume corresponds to zero height and also to zero base area.
In between these extremes is a maximum volume.
Write the prism volume equation in terms of one variable only using the surface area information.
Differentiate the volume equation,
finding the maximum value of the volume equation.