Start with appropriate representations: L = length and W = width. Then W = L - 1.
The perimeter is P = 18 in = 2L + 2W, which here would be:
18 in = 2L + 2(L - 1), or 18 in = 4L -2. Solving for L:
20 in = 4L, and L = 5 in.
Then W = 5 in - 1 in = 4 in.
Note that 2W + 2L does come to 18 in here: 2(5 in) + 2(4in) = 18 in.
The side lengths are 4 and 5 inches, respectively.