Were Abū Ḥanīfa and Du Fu alive at the same time?
Yes. Abū Ḥanīfa and Du Fu were alive at the same time, from AD 712 to AD 766–767.
Abū Ḥanīfa was 12 or 13 when Du Fu was born.
Abū Ḥanīfa
8th-century Sunni theologian and jurist
Born 5 September AD 699 · died AD 766–767, aged 67 or 68