the maximum volume enclosed by circular cylinder inscribed in a sphere equal to n times the volume of the sphere, find the value of n

how to solve this??

i know using the pyth theorem , the square of radius of cylinder + 1/2 square of the height of the cylinder is equal to square of the sphere's radius

i also list two volume equations

but how to do the next step???

because there are two variable, it seems cannot be reduced to only 1 variables

HELP!!!