In the RM2 rules as written, you just can't use a bow in melee range (Arms Law, red band version, section 3.2, p. 9) if you are engaged. The rules define engaged as having been melee attacked by a combatant (and currently being melee attacked), and withn 5'-10'.
Note too that the phase structure of RM2 made it difficult to disengage. If the archer tried to move back 10' to be able to shoot an arrow, the swordsman could just move forward and press the attack. I believe RMSS actually formalized rules for this with the 'press and attack' action. Of course, if the swordsman doesn't press the attack, the archer could fire.
We have in the past imported D&D style rules into RM2 to cover actions like disengaging with a bit more definition and specificity. We have for example used the D&D '5-foot step' or '5-foot move', and the disengage action. Note however that this makes it much easier for archers to move just out of melee range and use ranged weapons.
Another option would be to take a page from RMU. Since RMU dispenses with the phased combat system and uses an action point system instead, it offers a specific 'Withdraw' action that reduces movement by half and limits max pace to a jog. (It is not that dissimilar to the D&D '5-foot step'). I further define this withdrawal action to have a specific action point cost: 1 AP.