The volume of the tank is:

......[1]

The surface area of the hemisphere is given by

The surface area of the cylidrical portion, excluding the base is given by:

So, the total surface area is:

But, the cost for the hemsphere is $400 and the cylinder is $300:

....[2]

Solve[1]for, say, h and sub into[2]. Then differentiate, set to 0 and solve for r. h will follow.