The perimeter of a rectangle could be determined using

From the question above, we could draw informations
p = 40 inches
l = 3w
plug in the info to the perimeter formula
p = 2(l + w)
40 = 2(3w + w)
40 = 2(4w)
40 = 8w
w = 40/8
w = 5
l = 3w
l = 3(5)
l = 15
The dimension:
l = 15 in
w = 5 in