Well, h is related to r and so is not really an independent variable, and you are told that the surface area is S (and by implication is a constant, it could have been worded better). Then you are to find the value of r that maximises V subject to the surface area being S. Without this constraint (that S is fixed) there is no maximum for V, as we can let r become arbitarily large and V will also become arbitarily large.

RonL