Let's make a wuick sketch of the metal. Let x be its width. Since the length is 15 in longer, the legnth is x + 15:
As we can see, both the length and the width will lose 3 in on each side, so each will be 6 in smaller on the final box.
The height of the box will be just the dimension of the square that was cut off.
So, the final box will have a length of x + 15 - 6 in and a width of x - 6 in, and its height is 3 in.
The volume of a rectangular box like this is the products of its three dimensions, so:
We know the volume is 1218 in³, so:
To solve x, we will first need to distribute the parenthesis, but before that we can simplify the equation by dividing both sides by three:
Now, we have a quadratic equation, so we can use the quadratic formula to solve for x:
Since x is the original width of the box, it can't be a negative value, so the second solution is invalid in this case.
This means that the only possible solutions is 20, and its units is in inches, so 20 in.
So, the original width was 20 in, which makes the original length equal to 35 in.