If this was a rule 240 situation you should be able to get the miles on both airlines. Submit your AAdvantage card for the AA flight. After you finish the trip call Mileage Plus and tell them what happened (don't tell them you got AA miles on the AA leg) and you will be credited for the cancelled UA leg.