lwh = 168
(2x - 6) * (x - 6) * 3 = 168
6 * (x - 3) * (x-6) = 168
(x - 3)(x - 6) = 28
x² - 9x + 18 = 28
x² - 9x - 10 = 0
(x - 10)(x + 1) = 0
This would mean that x is either 10 or -1, but since we cannot have a negative length x is 10.
The dimensions of the cardboard is then 20 by 10.