Final answer:
The width of the rectangle is 2 cm and the length is 4 cm.
Step-by-step explanation:
Let's denote the width of the rectangle as 'w' cm. According to the given information, the length of the rectangle is 2 centimeters less than three times its width, which can be represented as: Length = 3w - 2 cm.
The perimeter of a rectangle is given by the formula P = 2(length + width). Substituting the values, we have 12 = 2((3w - 2) + w). Simplifying the equation, we get 12 = 2(4w - 2).
Dividing both sides by 2, we have 6 = 4w - 2. Adding 2 to both sides, we get 8 = 4w.Dividing both sides by 4, we get w = 2 cm.
Therefore, the width of the rectangle is 2 cm. Substituting this value back into the equation for length, we get Length = 3(2) - 2 = 4 cm.