Let L = length
W = L - 5 ←5 feet less than (reverse order - ) the length (L)
D = L + 5
These 3 lengths form a right triangle with D being the hypotenuse, c.
Using the Pythagorean Theorem, a² + b² = c²
L² + (L - 5)² = (L + 5)²
L² + L² - 10L + 25 = L² + 10L + 25
L² - 20L = 0
L = 0 (can't use this answer) or L = 20 (this is a usable answer)
Dimensions of the sandbox 20 ft by 15 ft
Length = 20 ft
Width = 15 ft
Diagonal = 25 ft