Chosen Solution

Both the USB Ports in my MacBook Air are damaged and not working/detecting due to bent pins inside, so can they be replaced by soldering

The main logic board port might be replaceable by someone with very good skills. It is not something a DIY person can do and could be expensive and risky! You maybe forced into getting a new logic board if it goes badly. As you have both ports damaged the I/O board would be cheaper to replace and just live with the one working port MacBook Air 11" (Mid 2011) I/O Board and here’s how: MacBook Air 11" Mid 2011 I/O Board Replacement