Question 674558
<pre>

{{{drawing(400,175,-1,31,-1,13,

line(0,0,24,0),
line(24,0,24+4sqrt(2),4sqrt(2)),
line(24+4sqrt(2),4sqrt(2),24+4sqrt(2),6+4sqrt(2)),
line(24,0,24,6),line(0,0,0,6),
line(0,6,24,6),
locate(12,0,24cm), locate(0,0,A),locate(24,0,B), locate(5.5,5.5,C),
locate(5.6,12.99,D),locate(3.2,3.2,8cm),locate(5.8,9,6cm),

line(24,6,24+4sqrt(2),6+4sqrt(2)),
line(4sqrt(2),4sqrt(2)+6,24+4sqrt(2),6+4sqrt(2)),
line(0,6,4sqrt(2),4sqrt(2)+6),
green(line(0,0,4sqrt(2),4sqrt(2)), line(4sqrt(2),4sqrt(2),4sqrt(2),4sqrt(2)+6),
line(4sqrt(2),4sqrt(2),24+4sqrt(2),4sqrt(2)),line(4sqrt(2),4sqrt(2),24,0)),
red(line(4sqrt(2),4sqrt(2)+6,24,0))




)}}}

You inadvertently left out the formula, so I'll do it without the formula
first and then again with a formula.  

We want the length of the red line DB, which is the
diagonal of the box.  

There are two right triangles ABC and DBC.

First we calculate the hypotenuse BC of right triangle
ABC using the Pythagorean theorem:

 BC² = AC² + AB²
 BC² = 8² + 24²
 BC² = 64 + 576
 BC² = 640
 BC = &#8730;<span style="text-decoration: overline">640</span>
 BC = 8&#8730;<span style="text-decoration: overline">10</span>

The required diagonal, the red line DB is the hypotenuse of
right triangle DBC.  So we use the Pythagorean theorem again

DB² = DC² + BC²
DB² = 6² + 640   (Notice we only needed BC², not BC)
DB² = 36 + 640
DB² = 676
 DB = &#8730;<span style="text-decoration: overline">676</span>
 DB = 26

So the diagonal DB is 26 cm in length, without using the formula,
but only the Pythagorean theorem.

-----------------------------------------------

The formula you omitted is:

d = &#8730;<span style="text-decoration: overline">L² + W² + H²</span> 

Substituting gives

d = &#8730;<span style="text-decoration: overline">L² + W² + H²</span>

d = &#8730;<span style="text-decoration: overline">24² + 8² + 6²</span>

d = &#8730;<span style="text-decoration: overline">576 + 64 + 36</span>

d = &#8730;<span style="text-decoration: overline">676</span>

d = 26 cm

Edwin</pre>