I'm no expert here, but if you are sending serial data between two XBee's, the easiest way is just to use transparent mode (AT mode).
I have two S2C modules, one taking serial data from a GPS module, transmitting that data to a second S2C XBee, both configured as API disabled, and they operate like a cable link. I read the data at one end using an FTDI module (or CH340G) The GPS module has TX and RX pins - these connect to the RX and TX of the XBee, then at the other end, the second XBee's TX and RX connect to the RX and TX of the FTDI module. It's called a virtual cable and works really well. All you need to do is set the PAN ID on both to the same value like 1234. I know nothing about RPi, only Atmega