You can put this solution on YOUR website!
Assign a variable to one of the sides. It's easier to assign it to the width because we can the do "four less than twice the width"
Let x be the width
Length(four less than twice the width) is 2x-4
The perimeter is what you get when you add up ALL of the exterior sides. In a rectangle there are four sides. We add up the expressions for all four sides and make it equal to 40. We don't need brackets when adding but it's good practice.
x+2x-4+x+2x-4=40 remove brackets
6x-8=40 Collect terms
6x=48 Add 8 to both sides
x=8 divide both sides by 6
This is the value of x which is the width.
To get the length you must plug it back in to the length expression.
So the width is 12cm and the length is 8cm.
Check: Do these sides add up to the perimeter? 12+8+12+8=40. Yes they do...