Maybe make the firing and walking a boolean?
1 If right pressed, walking is ture
else walking is not true
2. if fire pressed, firing is true
else firing is not true
3. If Walking true and firing not true play walk. Make arm visible
4. If walking is not true and firing is true play "fire" animation.
5. If walking and firing are true play "walk" animation and make "walk arm" invisible and make "fire arm" visible.
Untested, just thought it up on top of my head.