XBee pro sx module configuration

I want to know how can i configure xbee module in such cases that one device receive sending data from serial and send that over the air and other device receive RF data and sends it to serial, and vise versa.
Please help me.

At default settings they are already configured to be a wireless serial connection.

Try looking at the user guide under the product documentation: https://www.digi.com/products/xbee-rf-solutions/embedded-rf-modules-modems/xbee-sx#productsupport

The modules default configuration is 9600 baud, 8 data bits, No parity and 1 stop bit with all data that enters the UART to be sent as a Broadcast transmission to any other node that is in range to receive the packet or within the maximum number of hops. That receiving module will then pass that data out its UART all on its own. This is the default configuration directly from Digi.