The problem uses the perimeter formula. P = 2w + 2l where w is the width, and l is the length.
We know the length (l) is 3 inches longer than it's width (or l = w+3). Substitute w +3 into Perimeter equation.
P = 2w + 2(w+3). That simplifies to P = 4w + 6.
Since P + 42, we have 42 = 4w +6.
With some simple algebra we find that w = 9 and l = 12.