Answer: 5 meters
Why?:
Let the width of the room be denoted by 'W'
Since the room is three times as long as its width, the length will be '3W'
remember perimeter of a rectangle is = 2(length + width) and is given in the question as 40 meters.
Perimeter = 2 (length + width)
40 = 2 (3W + W)
40 = 2 (4W)
40 = 8W
(Dividing both sides by 8), gives
5 = W