The area of the cylindrical part is
$$A=2\pi rh$$
and the area of the spherical part is
$$A=4\pi r^2$$ so the cost is given by:
$$C=2\times2\pi rh+3\times4\pi r^2$$
The area of the cylindrical part is
$$A=2\pi rh$$
and the area of the spherical part is
$$A=4\pi r^2$$ so the cost is given by:
$$C=2\times2\pi rh+3\times4\pi r^2$$