But if I use Xbee libraries, DHCP libraries,UDP libraries in my code it works till 512 bytes of packet size.
You have, on the Arduino, only 2048 bytes of SRAM. The HardwareSerial class uses some of that. The other libraries use more of it.
If anybody help me to increase the packet size till 1472 bytes that would be really helpful for me.
Easy. Get a Mega which has 8096 bytes of SRAM.
Do I need to modify the library files?
Changing the code won't increase the amount of memory you have. Only changing the hardware will help.
Alternatively, you can parse the data as it arrives, rather than trying to store all 1400+ bytes.