Arduino node red connection

How can I read the string from serial input and print the output string in serial out at the same time via same serial port in node-red.

Which bit don't you know how to do? Have a look at the serial port nodes to start with.