On the outbound it should be easy. Just put the AC number in (and request the upgrade) then change it at the counter in LAX to your UA number.
The return is trickier. But if you're willing to not worry about the upgrades on that flight it shouldn't be much trouble.