sān nián qián (三年前), means three years agao
qián sān nián (前三年), mean the first three years.
If qián is after number/time, qian means ago, while if qián is before the number/time, it means first.
other examples:
shí fēn zhōng hòu 十分钟后,ten minutes later
hòu shí fēn zhōng 后十分钟,last ten minutes
yí gè xīng qī qián 一个星期前,a week ago
qián yí gè xīng qī 前一个星期, first one week