I want to access both of the multiplexed I2C and UART pins in the same program. I am programming in Arduino IDE.Can anyone please tell me how to access same pins for different functionalities?
You can't. (Well, you can, but you mustn't).
I2C and UART are electrically incompatible bus systems. UART is a Push-Pull system, whereas I2C is an Open-Drain system. The Push-Pull connections will interfere with the Open-Drain outputs and I2C will not function.
If you want to have both you will need to include extra hardware (and the necessary control pins) to physically isolate the different devices from their respective bus when not in use.