Refer to the attached figure,

From Geometry,



Differentiating wrt H and equating the first derivative to 0,we get


H=0 is surely not the ans as the volume of the cone becomes 0.
Hence the altitude of the right circular cone of maximum volume that can be inscribed in a sphere of radius r is 4r/3