Question 1127062
8, width
h, height
x, length
42, surface area all six sides


{{{2hx+2*8h+2*8x=42}}}

{{{hx+8h+8x=21}}}

-

Height as Function of Length
{{{h(x+8)+8x=21}}}
{{{h(x+8)=21-8x}}}

{{{highlight_green(h=(21-8x)/(x+8))}}}


Volume Formula
{{{v=8x((21-8x)/(x+8))}}}


{{{v=(168x-64x^2)/(x+8)}}}

-

{{{dv/dx=((x+8)(168-128x)-(168x-64x^2)*1)/(x+8)^2}}}

skipping all the steps,

finding extreme value of v

{{{(-64x^2-1024x+1344)/(x+8)^2=0}}}


{{{highlight_green(x^2+16x-21=0)}}}



{{{x=(-16+sqrt(4*4*16+4*21))/2}}}


{{{highlight_green(x=-8+sqrt(85)))}}}
If no mistakes made, this is the length, x, for maximum volume v.