Rashi says the wooden went into the gold and the gold went in the wooden. The Maharil Diskin helps straighten out our understanding of Rashi. Each of the three boxes has an inside and an outside, not only the wooden. Rashi explains that very well. All we need now is to know what it means.
Man is the wooden box.
The two boxes of gold represent the two types of Torah, the revealed and the hidden. The revealed being the outer gold box and the hidden being the inner gold box. We begin our education with the revealed Torah. The outer gold box. But even the Revealed Torah has it s more secretive side.