please help me work this out! set up and solve a quadratic equation to work out the value of x

Answer:
x = 8
Step-by-step explanation:
✔️Area of the square = s²
Where,
s = (2x - 4)
Area = (2x - 4)² = (2x - 4)(2x - 4) = 2x(2x - 4) -4(2x - 4)
= 4x² - 8x - 8x + 16
Area of square = 4x² - 16x + 16
Area of rectangle = L × W = (3x - 6) × x
= 3x² - 6x
✔️Since both have the same area, therefore,
4x² - 16x + 16 = 3x² - 6x
Collect like terms
4x² - 3x² - 16x + 6x + 16 = 0
x² - 10x + 16 = 0
Factorize
x² - 2x - 8x + 16 = 0
x(x - 2) -8(x - 2) = 0
(x - 2)(x - 8) = 0
(x - 2) = 0 or (x - 8) = 0
x = 2 or x = 8
If we plug in x = 2 into any of the given side length, we would have 0. (i.e. 2x - 4 = 2*2 - 4 = 0)
So the value of x cannot be 2 because the length of any of the shape cannot be 0.
So therefore, the value of x = 8