We must minimize the cost of the material, so we need the surface area.
The surface area of the sphere is
The surface area of the cylindrical portion is
Use the volume formula to solve for a variable and sub into the surface area formula so that it is in terms of one variable.
Then, you can optimize. Don't forget to take into account the cost conditions given.