The recommend + person + to-infinitive formulation seems to have been more common in the past, while the recommend that + person + subjunctive appears to be gaining currency. Here's an example of the change using the pronoun him and the verb be.
Your options (A) and (D) are correct, while (B) and (C) are incorrect for the meaning you're trying to convey.
I asked them if they would do me a favor.
The word "would" here is correct idiomatic English. If you extract the if-clause into its own sentence you get "They will do me a favor." However, when used as a subordinate clause with if, the verb will must become would in order to agree with the past tense asked.
I asked them if they do me a favor.
This is bizarre and ungrammatical. The tenses in both clauses should agree in most situations, and in any case no English speaker would ever say this.
I asked them if they did me a favor.
This is grammatically correct, but makes little sense. The tenses between the clauses agree as they should, but having both clauses in the past tense means that you're asking if they have already done a favor for you. This is not what you want to say, I'm pretty sure.
I asked them to do me a favor.
This is semantically equivalent to the first option, but of course the syntax is completely different. Since infinitives have no tense, to do is correct here. You can use this option if you're nervous about tense agreement and modal verbs.
Best Answer
My experience is that "would" makes the verb feel a little tentative. I tend to use the construct when I'm not sure of my reception. So "I would recommend" gets used when I'm not sure if the person wants a recommendation.