IF: How to deal with the mobility rule/eligibility in the case of a researcher who resides in country A and works in country B?

The two determining elements of the mobility rule are the actual physical place of residence and the place of main activitiy.
This means that a priori the researcher would not be eligible to apply in one of the two countries. However, particular cases such as telework would be treated individually and analysed on a case by case basis during the eligibility check.