D. 3
You can use Pythagorean Theorem to figure this out.
a^2 + b^2 = c^2
4 would your b, and 5 would be your c. You would then solve for a.
Also, 3-4-5 triangles are just something that you can always count on. If two sides of a triangle are 3 and 4, you can count on the hypotenuse being 5. On the other hand, if you know the hypotenuse is 5 and you know one of the other sides is either 3 or 4 (let’s say 3, for example) then you know the missing side has to be the other number (which would be 4 in the example i gave).