Yes, either "to" or "for" can be used. "Of" however, I have never come across. On the other hand, one could "find the problem's solution".Both prepositions are perfectly correct. You can check the Longman Dictionary:
http://www.ldoceonline.com/dictionary/solution and the Macmillan Dictionary http://www.macmillandictionary.com/dictionary/british/solution . What I'm interested in, however, is whether 'of' is an option.
I agree that "The answer for your question" sounds unusual. But "We need a more permanent solution for our problem?" and "Where are the keys for my car?" are acceptable. I wouldn't think twice if I heard it phrased this way. I'm actually pretty sure I sometimes even say "I can't find the keys for my car" (Although more often I would just say "car keys", bypassing the preposition altogether.)I say use "to!" There are a number of nouns that take "to" as a preposition:
injury to, key to, answer to, damage to, solution to, claim to.
They don't sound right at all with "for" despite the weird Macmillan example (The Longman link shows only "to.")
The answer for your question? No. We need a more permanent solution for our problem? No. Where are the keys for my car? No.
His claim for the throne was unrecognized. No.
"Of" is even worse.
Memorize these five: injury, key, answer, solution, damage, claim--and use "to."