The perimeter = (2 lengths) + (2 widths) = 12
(1 length) + (1 width) = 6
Area = (length) x (width)
So you need two numbers that add to 6 and multiply to 9 .
How about 3 and 3 ?
Area = 3 x 3 = 9
Perimeter = 3 + 3 + 3 + 3 = 12
It works, and your rectangle is actually a square !