“de” means “from”
“à” means “to”, with the verb “rentrer” in the sense “again”
As in English or German prepositions can have several meanings. There is not an one-to-one correspondance between English and French prepositions. It depends on the context. It is true that generally from can be translated with de but it is not always true. In your example:
Je rentrais de+le tennis => Je rentrais du tennis. (contracted
Je rentrais de la maison (no contraction).
Other exemples in which is translated by de include:
C’est loin de la maison. (…far from…)
Dites-lui cela de ma part. (tell him/her that from me)
Voici la lettre de ma mère.
Note that en can remplace in this context de. Thus,
Je rentre du tennis => J’en rentre (I returned from it).
Regarding rentrer+à here is an example:
Elle est rentrée à la maison. She returned to the home.
Note that y can remplace à in this context.
Elle y est rentrée. She returned to it.
Edit after reading Feelew’s comments:
Everything below applies to revenir, not rentrer. In the case of rentrer it’s easier, because you can only rentrer home, so it must be from tennis!
The other answers are good, but to try to address your question more directly:
- Your method of looking up revenir in the dictionary to see if revenir de exists is good.
- Then you would know that it was a collocation / fixed expression, like traiter de “be about”.
- The next step is the one you seem to be wondering about:
- If there’s no collocation, translate the preposition in its general sense.
So you would go through the possible meanings of de. As dimitris said, there are no one-to-one equivalents for prepositions, but you know that the most common are probably from and of, with a more distant with (double-check by skimming the WordReference entry).
Then try them out. Usually only one or two plausible options arise:
I was coming back [ from / of / with ] tennis.
I was coming back [ from /
of/ with] tennis.
I was coming back from tennis.
Since there is no collocated entry revenir de, you know that you could slot other prepositions in there. The preposition isn’t glued to this verb. Let’s try à or au since you asked about it in a comment.
I’d say that à is most often to, at, or in:
I was coming back [ to / at / in ] tennis.
I was coming back [ to /
at/ in ] tennis.
To decide between to and in you would have to do go a little deeper. “Coming back to tennis” seems to mean returning to the game or picking up the sport after abandoning it for a while. “Coming back in tennis” seems to mean catching up after being on the losing side.
This second meaning of “come back (to success)” can be translated by revenir, (see the WordReference entry) and it might be mainly context that helps you decide which one to use.
I was coming back to tennis.
The process would be the same for any preposition. Some are easier to disambiguate than others.