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.