4, but why?
Well, area = l x w = lw
Perimeter = 2l + 2w
When they are equal, we get:
lw = 2l + 2w
0 = 2l - lw + 2w
-2w = l(2-w)
Since must be an integer, w can only be equal to 3,4 or 6. Any larger value will give rise to a fraction.
Hence, when the width is 3, the length becomes 2+4 = 6
When the width is 4, the length becomes 2+2 = 4
When the width is 6, the length becomes 2+1 = 3
That's it!