In French, the preposition must come at the very beginning of the question, before qui if it’s a who question and before quoi if it’s a what question. With questions such as Who did you say that to? and What did you do it for?, to and for are prepositions.
In English, people understand your meaning if you put the preposition at the end (even though your English teacher may have taught you that it’s improper).
A French preposition plus “who”
When you ask a question like Who is it for? or Who did you play with?, who is never the subject of the verb. So you need to use the kind of question with qui (who) as the object of the verb.
Here’s a reminder of how easy it is to form this qui question:
For an est-ce que question, start with qui, add est-ce que, add the noun/pronoun subject, and then say the verb: Qui est-ce que Paul aime? (Whom does Paul love?)
For a question in inversion format, start with qui, add the noun subject if the sentence has one, add the verb, and then add the pronoun subject (don’t forget the hypen), like this: Qui Paul aime-t-il? (Whom does Paul love?)
To form a qui question with a preposition (like de, which means of) proceed like for a qui question, just adding the preposition in front of qui like this: De qui est-ce que Paul est amoureux? or De qui Paul est-il amoureux? (Who is Paul in love with?)
Here are a few more examples:
Avec qui travaillez-vous? or Avec qui est-ce que vous travaillez? (With whom do you work?)
De qui ont-ils hérité ce château? or De qui est-ce qu’ils ont hérité ce château? (Whom did they inherit this castle from?)
A French preposition plus “what”
Say you want to ask your friend, What do you do that with? Your question is not just what but with what, using the preposition with. The only tricky part is that que becomes quoi when it is used with a preposition.
Start from a yes/no question with est-ce que, without any question word.
For example, you can say Est-ce que tu fais ça? (Do you do that?)
Choose the French preposition.
In this example, you need the equivalent of with: avec.
Put your preposition at the beginning of the question, followed by quoi.
In this example, you use avec quoi (with what).
Attach the yes/no est-ce que question you already have.
Here, you say Avec quoi est-ce que tu fais ça? (What do you do that with?)
You can ask the same type of question using inversion instead of the est-ce que format. Start with a yes/no question with inversion this time; for example, you can say Fais-tu ça? (Do you do that?) and attach avec quoi in front of it to get Avec quoi fais-tu ça? (What do you do that with?)
Here are more examples that use various prepositions, first in the est-ce que form and then in inversion form.
Dans quoi est-ce que tu mets ton portable? Dans quoi mets-tu ton portable? (What do you put your cellphone in?)
À quoi est-ce que tu veux jouer? À quoi veux-tu jouer? (What do you want to play at?)