Okay, let's try to figure out this problem step by step. So, Roslyn has ten boxes in total. Among these, five boxes have pencils, four have pens, and two have both pens and pencils. The question is asking how many boxes contain neither pens nor pencils. Hmm, I need to find the number of boxes that don't have either pens or pencils. Let me think.

First, I remember that when dealing with overlapping groups, the principle of inclusion-exclusion might be useful here. That principle helps calculate the total number of elements in the union of two sets by adding the sizes of the individual sets and then subtracting the size of their intersection. So, the formula is: |A ∪ B| = |A| + |B| - |A ∩ B|. 

In this context, set A could be the boxes with pencils, and set B the boxes with pens. The intersection of A and B would be the boxes that have both pens and pencils. According to the problem, |A| is 5, |B| is 4, and |A ∩ B| is 2. Plugging these into the formula: |A ∪ B| = 5 + 4 - 2 = 7. So, there are 7 boxes that contain either pens, pencils, or both. 

Since there are 10 boxes in total, the number of boxes that contain neither pens nor pencils would be the total boxes minus the boxes that have either pens or pencils. That would be 10 - 7 = 3. Therefore, the answer should be 3 boxes. 

Wait a second, let me verify that again. If five boxes have pencils and four have pens, but two are counted in both, then the total number of boxes with at least one of the items is indeed 5 + 4 - 2 = 7. Subtracting that from the total 10 gives 3 boxes without either. Yeah, that seems right. 

Another way to think about it: the boxes with only pencils would be 5 - 2 = 3, the boxes with only pens would be 4 - 2 = 2, and the boxes with both are 2. Adding those up: 3 + 2 + 2 = 7. Then 10 - 7 = 3. Yep, same result. 

I don't see any mistakes here. The key was applying the inclusion-exclusion principle correctly and making sure not to double-count the boxes that have both pens and pencils. So, the final answer should be 3.
Therefore, the number of boxes that contain neither pens nor pencils is $\boxed{3}$.
</think>