The hypotenuse is x+5 and the legs are 16, and 7 so how would you use the pythagorean theorem.

use it as you always do:

16^2 + 7^2 = (x+5)^2

and solve for x

x^2+10x+25 = 256+49 = 305
x^2+10x-280 = 0

or, just start with the numbers:

16^2+7^2 = 305
so, x+5 = √305
and work from there.