A cuboid is made of squares and rectangles, with the diagonal 'L' connecting opposite corners of the 2 square faces. As the cuboids corners are all right angles, all the diagonals form right angled triangles, therefore, pythagoras can be applied to calculate L. As we have 2 unknowns, 'a' and 'L', we need to equate both L and 'a' to find the answer.
Applying Pythagoras: a2 = b2 + c2 therefore; L2 = 52 + x2 where x2 = a2 + a2 = 2*a2
L is the hypoteneuse of a large triangle, with '5 cm' being its height, and an unknown 'x' being its base. This unknown length is the hypoteneuse of the square bottom of the cuboid, which has lengths 'a'.
As we are finding an expression for 'a' we need to rearrange our equations so 'a' is the subject.
2*a2 = L2 - 52
To find 'a' we then simply divide by 2 and find the square root.