Can’t you just substitute.
-x+4=2x-8
12=3x
4=x
A^2 + b^2 = c^2...a and b are the legs and c is the hypotenuse
20^2 + 21^2 = c^2
400 + 441 = c^2
841 = c^2
sqrt 841 = c
29 = c <== third straw will be 29 cm
Recall that

There are three cases to consider:
(1) When

, we have

and

, so

(2) When

and

, we get

and

, so

(3) When

, we have

and

, so

So