Which statement explains the Pythagorean Theorem?

A. If all angles in a triangle are of equal measure, then the length of all sides will be equal.
B. If a triangle is a right triangle, then the sum of the squares of the longest leg and the hypotenuse is equal to the square of the third side.
C. If the interior angles of a triangle add up to 180°, then the sum of the legs of the triangle is equal to the square of the hypotenuse.
D. If a triangle is a right triangle, then the sum of the squares of the legs is equal to the square of the hypotenuse.

D. If a triangle is a right triangle, then the sum of the squares of the legs is equal to the square of the hypotenuse.