Answer is
Square has sides with length of 6 units, area is 36 units squared
Rectangle has width of 3 units and given length of 12, with area of 36 units squared
Step by step
We know a square has 4 equal sides so we can divide perimeter by 4 = 6 units per side.
A = L x W. Area of the square is 6 x 6 = 36 units squared.
Now we know the rectangle has the same area of the square, 36 units squared. We know L = 12. Sub these into our formula.
A = L x W
36 = 12 x W
Divide both sides by 12 to solve for W
36/12 = 12/12 W
3 = Width
Problem solved