Eagle CAD Multiple individual parts in one device
For simple CAD management and hand assembly, this process would work:


Find or create the footprint for the 10 pin, 2mm connector you plan to use
Copy the footprint twice into a new footprint, then assign the correct pin numbers and ensure that the relative positions/alignments are correct for your module


Then you can use that footprint with whatever symbol you have created for the XBee module.

However, as pointed out in the comments, this prevents the individual headers from having accessible data for automated assembly. Making this data available requires a more complicated CAD process and attention to multi-part components.


Find or create the footprint for the 10 pin, 2mm connector you plan to use
Make two copies of the footprint, then add silkscreen to distinguish the left/right connectors. Also, adding data on a mechanical layer to indicate the required spacing between the two headers would give more immediate context in layout.
Create schematic symbols for the two 'halves' of the component. Make sure you have a comment indicating that each symbol is only half of the required connectivity.
When you use the symbols in your schematic, place comments in the schematic that there are two footprints that require an exact relative positions in layout.
During initial footprint placement in layout, find the two halves and set their coordinates as desired on the board. I'm not sure if Eagle can do this, but, if you can, then "union" the two footprints into one object or lock both of their coordinates on the board. This should help prevent accidentally moving only one of the footprints and ending up with an Arduino-like spacing error in your design.