Side lengths 4 (length) and 2 (width) satisfy this word problem.
We see know that the perimeter of a rectangle is given by 2l+2w. If 2l+2w were to equal 12, 2l would have to be less than 6 (because 2(6) has already reached the perimeter limit). We can start testing values from there (keep in mind that your primary secondary side length must be 2 less than the primary one).
2(5)+2(3)=10+6=16 No 2(4)+2(2)=8+4=12 Yes 2(3)+2(1)=6+2=8 No
We see that side lengths 4 and 2 are the only sides that satisfy the perimeter.