Let w=width, then length=2w. It is assumed that the length and width are those of the floor and the roof. Let h=height (of the prism).
Volume 800=2w²h, h=400/w².
Area of floor and roof=2w², cost of roof=$500w², cost of floor=$100w².
Cost of floor and roof=$600w².
Area of walls=4wh+2wh=6wh,
cost of walls=$600wh=600w(400/w²)=$240000/w.
Total cost C=240000/w+600w².
dC/dw=-240000/w²+1200w=(-240000+1200w³)/w².
When dC/dw=0,
1200w³=240000, w³=240000/1200=200.
Therefore, width w=∛200=5.8480m approx.
Length=11.6961m, height=400/w²=11.6961m.
Minimum cost=$61,559.13.