I've attached a sketch of the situation.

1. You are dealing with a right triangle. According to Euklids theorem you have:

and :

2. The volume of the cone is calculated by:

3. Substitute :

and

4. You have now the volume as a function of h:

5. Calculate the first derivation of V(h) and solve V'(h) = 0 for h.

I've got