I had answered the question about this on the ELU site. I am taking the liberty of reposting my answer here:
The trick to knowing how to use; of which, at which, in which, to which, from which (etc.) is to analyse the prepositional phrases, phrasal verbs, verbs and prepositions in a sentence and then see how it can be transformed:
He /spoke of/ war and peace and many other topics that day. The topic
/of which he spoke/ was complex. The verb here that means to speak about a topic is /to speak/ of a topic/: to mention
The party /at which/ he spoke/ was noisy. Phrase: A party is held /at
a place/. It is implied.
The situation /in which/ we found ourselves was dire. Phrase: /to find
oneself /in a situation.
The bonds /from which/ we broke free were tight.
phrase: to /break free/ from bonds.
The town /to which/we were driving was 50 ks away. phrase: to /drive/
to a place.
Summary (and not a complete answer but a general one): The preposition depends on the verb that takes a preposition, a phrasal verb that includes a preposition, or it depends on the prepositional phrase used. Also, there are many other prepositions that can be paired with which: under, during, about, over, etc.