Preposition in vs. of
Solution 1:
of poverty sounds more correct here. The condition of which they survived is poverty. You would use in if there was an extra verb, such as living in poverty.
Solution 2:
Both sentences are correct, and have approximately the same meaning.
However, their structures are different. In the first sentence, "of poverty" is a adjectival phrase that modifies the noun "years". In the second sentence, "in poverty" is an adverbial phrase that modifies the verb "have survived".
Solution 3:
It depends on the intention.
- The children have survived 10 years of poverty.
Here the danger or the threat comes from the poverty itself. So although being poor (and with little to eat etc.) they survived.
- The children have survived 10 years in poverty.
Here it just says the children survived 10 years (of whatever) while they were poor. The danger or what they survived is not named. Just the state they were in through these years.
A good example to show the difference might be:
- He died in grief.
He might have died years later due to another circumstance but still in grief after he lost his wive.
- He died of grief.
He died because of the grief his wife's loss caused.