Use the formula for volume of a box. Fill in the given values and solve for the remainder.
V = L*W*H . . . . . . . . . . . . . . . . . formula for volume of cuboid shape
98 in^3 = L*(3.5 in)*(4 in) . . . . . with given numbers filled in
98 in^3 = L*(14 in^2) . . . . . . . . . multiply
(98 in^3)/(14 in^2) = L . . . . . . . . divide by the coefficient of L
7 in = L . . . . . . . . . . . . . . . . . . . . simplify
The length of the box is 7 inches.
_____
You will note that the units, inches, square inches, cubic inches, can be treated as though they were a variable. Just as z^3/z^2 = z, so does in^3/in^2 = in. This can help you make sure you're doing the math properly. If the units come out wrong, there's high probability the numbers are wrong, too.