\(A=\left[\dfrac{\left(a-1\right)^2}{a^2+a+1}+\dfrac{2a^2-4a-1}{a^3-1}+\dfrac{1}{a-1}\right]\cdot\dfrac{a\left(a^2+1\right)}{2a}\)
\(=\dfrac{a^3-3a^2+3a-1+2a^2-4a-1+a^2+a+1}{\left(a-1\right)\left(a^2+a+1\right)}\cdot\dfrac{a^2+1}{2}\)
\(=\dfrac{a^3-1}{\left(a-1\right)\left(a^2+a+1\right)}\cdot\dfrac{a^2+1}{2}=\dfrac{a^2+1}{2}\)