You booked through UA, so UA is the owner. Anything you give to UA may go to US. Nothing you give to US should go back to UA.
This is the sequencing that should work:
1. Enter the UA number at the UA site.
2. Then, enter the BA number at the US site.