Answer
$12$ in. by $12$ in.
Work Step by Step
Given,
Length of the box $(l) = (x-4)$ in.
Width of the box $(w) =(x-4)$ in.
Height of the box $ (h) =2$ in.
Volume $(V) = 128$ cubic inches.
Volume of the box $V = l \times w \times h$
$128= (x-4) \times (x-4 ) \times 2$
$ (x-4)^{2} = 64$
Using $(a-b)^{2} = a^{2} -2ab +b^{2} $
$ x^{2} -8x +16 =64$
$ x^{2} -8x +16-64 = 0$
$ x^{2} -8x - 48 = 0$
By factoring,
$(x-12)(x+4)=0$
$x=12$ or $x=-4$
Length (and the width ) should not be negative.
So, the dimensions of the square cardboard is $12$ in. by $12$ in.
Check:
Volume of the box
$V = l \times w \times h$
$V = (x-4) \times (x-4 ) \times 2$
Substituting $x=12$
$V = (12-4) \times (12-4 ) \times 2$
$V = 8 \times 8 \times 2$
$V = 128$ cubic inches.