Animate two objects with different armatures
For this I see two Solutions:


use for each armature an own animation
put all animations into a single animation 


What is now the best to choose?

That depends on in which way you use these animations.

If your arm- or gun-animation is alway the same, then it is probably better to make seperate animations. But if the arm-animation is dependend on the gun (or reversed), then I suggest to put all animations into a single one.

For declaration:

Action ~ combination of animations that are working together

Examples: Idling, Aiming, Shooting, Reloading

Animation ~ A set of keyframes

Examples: IdlingArms, IdlingGun, AmingArms, AminingGun

OPTION: Use for each armature an own animation

Foreach Armature and foreach action you create an animation. Make sure you give your animations meaningful names.

Note: This option is simple but animating can get hard, because for each action you have to make sure, each armature has it's own animation. And you will have many animations to handle.

OPTION: Put all animations into a single animation 

Foreach action repeat following process:


For each armature go into 'Pose Mode'
Go to the DopeSheet-Editor
Change Mode from 'Dope Sheet' to 'Action Editor'
Add a new Animation by clicking '+ New'
Maybe give your animation a name
Select all other armatures and select the created animation


Any Keyframe you insert will be in the same animation

In that way you will have the same amount of animations as you have of actions.

Note: In the 'Dope Sheet Summary' you will only see the keyframes from the selected armature.

I hope I could help.