Okay. The formula to the Pythagorean theorem is a^2+b^2=c^2
In this specific problem you have to find B so you will plug into the formula what you know and you will solve it.
24+b=40
You see, now it’s a one stepped equation, you will now subtract 24 from 40 which will give you B!
And B is 16!
I hope this helps!