The volume of a cuboid is = length × width × height.
Let the width of Olivia's lunch box be 'x'.
Hence the length of Olivia's lunch box shall be 'x + 2'
Also the height of the box is given as 3 inches.
The volume of the box is 240 in³
Substituting in the formula we get

Dividing by 3 on both sides

Exapnding we get

Subtracting 80 from both sides

Factoring

We get
x= -10 or x = 8
But x cannot be negative
So x = 8
Hence the width of the box is 8 inches.