Is it safe to give 5v through 5v pin of arduino uno r3 while the USB cable is inserted? I have ESCs connected to it which aren't likely to start in other cases. The 5v and gnd is coming from the BEC circuit of a connected ESC. Please help me. Thanks
It should be completely safe. Assuming that the 5V BEC on the ESC is not damaged then it is providing a regulated voltage to your Arduino. Furthermore, the USB port on the Arduino is protected from back current with Zener diodes, thus protecting whatever may be plugged into that port.
It looks like it's safe.