I can't quite read everything you wrote (low contrast), but I hope you see that z can be expressed in terms of x and h, but x, y, and h are independent in determining the shape. The fixed volume allows you to eliminate one variable (say, h), expressing it in terms of the other two; but you still have the surface area as a function of two variables, x and y.

Are you studying multivariable calculus, or just calculus with a single independent variable? In the latter case, you would have to make some additional assumption in order to make this a problem you can solve; one way is to fix the angle of the top (that is, the ratio of h:r). Then you can express everything in terms of one variable. And you could then, if you wish, find the angle that optimizes the optimum (this is essentially equivalent to the multivariable method, using partial derivatives).