When two words or phrases are used in parallel and require the same preposition to be idiomatically correct, the preposition does not have to be used twice.
You can wear that outfit in summer and in winter.
The female was both attracted by and distracted by the male's dance.
However, when the idiomatic use of phrases calls for different prepositions, we must be careful not to omit one of them.
The children were interested in and disgusted by the movie.
It was clear that this player could both contribute to and learn from every game he played.
He was fascinated by and enamored of this beguiling woman.