First you find the base of the big triangle which is also the same bass of the small triangle, so you use the pythagoras theorem on the small triangle and you get: 8 (the first picture)
After that you have 2 sides of the big triangle so you do the pythagoras theorem again and you get: 17 (second picture)