This is not an answer but a hint. a^2+b^2=c^2, where a and b are the shorter lengths of the right triangle and c is the longest. So for problem 18 and 19, it's pretty straightforward.
Answer for #20
For problem 20, the answer is 6sqrt2+6, because x and y are both 3sqrt2