Need help, WILL GIVE BRAINLIEST!!!

Part A: x=2
This would make both perimeters equal to 24.
Part B: No solution.
You cannot make x equivalent to anything but 2, or the square would not be real. All four sides of the square must equal 6. This would make the area 36 units squared. If x was 2 for the rectangle, the area would be 20. It is impossible to make them equal. Tell me if I'm wrong, though.