Let \(\omega\) be a nonreal root of \(z^3=1.\) Let \(a_1, a_2,\dots,a_n\) be real numbers such that \(\frac{1}{a_1 + \omega} + \frac{1}{a_2 + \omega} + \dots + \frac{1}{a_n + \omega} = 2 + 5i.\)

Compute \(\frac{2a_1 - 1}{a_1^2 - a_1 + 1} + \frac{2a_2 - 1}{a_2^2 - a_2 + 1} + \dots + \frac{2a_n - 1}{a_n^2 - a_n + 1}. \)

Please I need help on this. It is very confusing.

AoPS.Morrisville Oct 20, 2019