34 cm = 2*(length +width)
length = 2 cm +2*width
You can use substitution to solve these equations, since you have an expression for length.
.. 34 cm = 2*((2 cm +2*width) +width)
.. 17 cm = 2 cm + 3*width . . . . . . . . . . . . divide by 2
.. 15 cm = 3*width . . . . . . . . . . . . . . . . . . subtract 2 cm
.. 5 cm = width . . . . . . . . . . . . . . . . . . . . divide by 3
length = 2cm +2*(5 cm) = 12 cm . . . . . . substitute width into equation for length
The length and width of the rectangle are 12 cm and 5 cm, respectively.