Question 144121
The side of the cardboard square: x
The length and width of the box: x - 4 (because you need to subtract 2 inches from each side)
The height of the box: 2


Volume of the box {{{(x-4)(x-4)*2=512}}}


Multiply the binomial and divide both sides by 2:
{{{x^2-8x+16=256}}} 


{{{x^2-8x-240=0}}}


{{{(x+12)(x-20)=0}}}


{{{x=-12}}} or {{{x=20}}}.  Exclude the negative root as extraneous and not meaningful since we are looking for a positive measure of length.  The original cardboard was then 20 inches by 20 inches.


Check:
Cut out 2 inch squares from the corners of a 20 X 20 piece of cardboard and then fold up the sides, making a 16 by 16 by 2 box.  {{{16*16*2=512}}}  Checks.