She met him three years ago.

Literal

She [topic-は] he [to-に] three-years-ago [at-に] met.

Two distinct uses of に in one short sentence. 彼に: 会う takes に (not を) for the person being met — meeting is conceptualized as motion 'toward' someone. 3年前に: a different に entirely, marking a specific point in time. Stacking two に like this is fine when each plays a distinct role.