Answer:
radius   x  = 3 ft
height   h = 23,8  ft
Step-by-step explanation:
From problem statement
V(t)  = V(cylinder) + V(hemisphere)
let x be radius of base of cylinder (at the same time radius of the hemisphere)
and h the height of the cylinder, then:
V(c)  = π*x²*h       area of cylinder = area of base + lateral area
                                               A(c)  = π*x²  +   2*π*x*h
V(h) = (2/3)*π*x³   area of hemisphere   A(h)  =   (2/3)*π*x²
A(t)  =  π*x²  +   2*π*x*h +   (2/3)*π*x²
Now A as fuction of x    
total volume   505  = π*x²*h  +  (2/3)*π*x³ 
h = [505 - (2/3)* π*x³ ]  /2* π*x     
Now we have the expression for A as function of x
A(x) =  3π*x² + 2π*x*h     A(x) = 3π*x² + 505  - (2/3)π*x³
Taking derivatives both sides
A´(x) =  6πx -  2πx²              A´(x) =  0         6x  - 2x²  = 0
x₁  =  0  we dismiss
6 - 2x = 0
x = 3     and   h = [505 - (2/3)* π*x³]/2* π*x 
h  =  (505 - 18.84) / 6.28*3
h  = 23,8  ft