To add or subtract expressions, expand them to make their denominators the same. Least common multiple of $a^{2}+a+1$ and $a^{2}-a+1$ is $\left(a^{2}+a+1\right)\left(a^{2}-a+1\right)$. Multiply $\frac{a+1}{a^{2}+a+1}$ times $\frac{a^{2}-a+1}{a^{2}-a+1}$. Multiply $\frac{a-1}{a^{2}-a+1}$ times $\frac{a^{2}+a+1}{a^{2}+a+1}$.
Since $\frac{\left(a+1\right)\left(a^{2}-a+1\right)}{\left(a^{2}+a+1\right)\left(a^{2}-a+1\right)}$ and $\frac{\left(a-1\right)\left(a^{2}+a+1\right)}{\left(a^{2}+a+1\right)\left(a^{2}-a+1\right)}$ have the same denominator, add them by adding their numerators.
Since $\frac{2a^{3}}{\left(a^{2}+a+1\right)\left(a^{2}-a+1\right)}$ and $\frac{2}{\left(a^{2}+a+1\right)\left(a^{2}-a+1\right)}$ have the same denominator, add them by adding their numerators.
To add or subtract expressions, expand them to make their denominators the same. Least common multiple of $a^{2}+a+1$ and $a^{2}-a+1$ is $\left(a^{2}+a+1\right)\left(a^{2}-a+1\right)$. Multiply $\frac{a+1}{a^{2}+a+1}$ times $\frac{a^{2}-a+1}{a^{2}-a+1}$. Multiply $\frac{a-1}{a^{2}-a+1}$ times $\frac{a^{2}+a+1}{a^{2}+a+1}$.
Since $\frac{\left(a+1\right)\left(a^{2}-a+1\right)}{\left(a^{2}+a+1\right)\left(a^{2}-a+1\right)}$ and $\frac{\left(a-1\right)\left(a^{2}+a+1\right)}{\left(a^{2}+a+1\right)\left(a^{2}-a+1\right)}$ have the same denominator, add them by adding their numerators.
Since $\frac{2a^{3}}{\left(a^{2}+a+1\right)\left(a^{2}-a+1\right)}$ and $\frac{2}{\left(a^{2}+a+1\right)\left(a^{2}-a+1\right)}$ have the same denominator, add them by adding their numerators.