Let's let w = width of the triangle. Let's also write the length in terms of w:
Length = 3w+1
The perimeter of the rectangle is 2l+2w=P
2(3w+1) + 2(w) = 50 [base equation]
6w+2+2w=50 [distribute the 2]
8w+2=50 [combine like terms]
8w=48 [subtract 2 from both sides]
w=6 [divide 8 from both sides]
Therefore, the width is 6 cm.
3(6)+1 is the length = 19 cm