Lay the Styrofoam on the cutting board on a solid table or work surface. Set the box beside it. Measure the bottom of the box. Mark the shape on the Styrofoam and then cut it out with the knife. Make sure it fits snugly in the bottom, apply silicone sealer or adhesive to the back of the foam piece and fit it into place.
Measure and cut the foam for inside the long sides of the box and cut the foam. You may find it easier if you lay the straight edge along the marks and make several passes with the knife until you cut through or the last bit breaks free. Apply sealant to the backs and place the pieces inside of the box. Make sure the foam does not stick above the top rim of the box.
Measure the space at the ends, cut foam pieces to fit there and seal them in place.
Measure the inside of box. Measure to the inside edge of the foam and not the sides of the box or the lid won't fit inside.
Mark a section of foam to fit the lid and cut it out. Affix the foam to the lid with sealer. Make sure that the fit is not too snug and that pulling off the lid pulls the foam away.
Use the sealer to seal any cracks or crevices in the foam and set the box open in a ventilated place to cure.
Line the inside of the box by covering the foam with cloth, if you wish. Simply cut and sew a cloth bag in the shape of the space in the foam, allow for a little overlap at the top and set it in place. The lining should be able to come out in order to be washed.
Load up your lunch and head off for a picnic.