1-They selected two of the boxes opposite each other.
2-They selected two of the boxes that were opposite each other.
3-They selected two boxes that were opposite each other.
4-They selected two boxes opposite each other.
Let us say there are two rows of boxes opposite each other. There may be other boxes strewn about in the room.
In which case:
a-The two boxes selected were in two different rows and were opposite each other ('opposite each other" modifies "two boxes")
b-The two boxes selected were in two different rows and were not necessarily opposite each other (one was in one row, the other in the opposite row, but they were not facing each other... 'the boxes aren't opposite each other, but the rows they belong to are')
c-The two boxes selected were not necessarily in different rows. They might have been in the same row, or even side by side. But they belonged to the two rows and not to the group of boxes spread about in the room)