Let x = one of the side lengths of the base.
Then area of the base = x². So volume of the base = x²h.
That gives us x²h = 20. Solving for x, we get x = √(20/h²).
Glass is needed to cover the sides of the aquarium. There are 4 sides and 1 base. Area of a side = hx = h√(20/h²). Area of the base = x² = 20/h. Total area of glass = h√(20/h²) + 20/h. So the cost for glass = 8 * [h√(20/h²) + 20/h] = 8 h√(20/h²) + 160/h.
Metal frame is needed along the edges of the sides. There are 4 edges on the top, 4 edges in the bottom and 4 vertical edges. So the total length of metal frame = 4x + 4x + 4h = 8 √(20/h²) + 4h. Then the cost for metal frame = 7 * [8 √(20/h²) + 4h] = 56 √(20/h²) + 28h.
So the total cost = 8 h√(20/h²) + 160/h + 56 √(20/h²) + 28h