@Randy Dandy,
Let K = the length of the small box in feet
The length of the big box is therefore 2K feet
The cost of charging by volume is 5 x ( K^3 + [2K]^3 )
The cost of charging by running feet is 5 x ( K + 2K)
The cost is the same which ever method is used so:
5 x ( K^3 + [2K]^3 ) = 5 x ( K + 2K)
5 x (K^3 + 8K^3 ) = 5K + 10K
45K^3 = 15K and simplifying
3K^3 - K = 0
K ( 3K^2 -1) = 0
K = 1/ ROOT 3 = 1/ 1.7321 = 0.5773FEET = 0.5773 X 12 INCHES = 6.928INCHES