Do you mean where does the a^3 go?
In the bottom right of the handwritten stuff it does
-a^3 - -a^3
-a^3 + a^3 = 0
so the a^3 gets canceled out and disappears.
If you expanded (x - a)(x^2 + ax + a^2), the -a and +a^2 times'd together would make -a^3. That's where the -a^3 went.