Originally military (literally 'chase troops'). Set phrase
前有强敌,
后有追兵 ('strong enemies ahead, pursuers behind') describes being trapped between two threats and is common in business / sports commentary too — e.g. a company sandwiched between an industry leader and aggressive challengers.