Answer: length of pencil is 9.8 inches.
Explanation:
The pencil fits perfectly from the upper left corner to the bottom right corner of the box. This is the diagonal of the box(not the diagonal of a face). To determine the length of the pencil, we would determine the length of the diagonal of the box. The formula formula is
d = √(l² + w² + h²)
Where
d = diagonal = length of pencil
w = width = 4 inches
h = height = 4 inches
l = length = 8 inches
Therefore,
d = √(4² + 4² + 8²) = √96
d = 9.8 inches