So, you might be asking about Length and Width
5-inch square, measured from corner of one part, to the other,
Volume of the carton is 40 in Squared.
The original length is probably 40 in Squared divided by 5 in.
About 8.06 inches estimated.
Correct me if i'm wrong, at least i tried on this one.