Solution 1: If we subtract the two equations, we obtain
ax2+8−8x2−a=(a−8)(x2−1)=(a−8)(x+1)(x−1)=0,
thus either a=8 or x=−1 or x=1. If a=8, we are left with
5x3+8x2+8=(x+2)(5x2−2x+4)=0.
The second factor has no real roots, since its discriminant 22−4⋅5⋅4=−76 is negative.
Thus x=−2 in this case.
If x=−1, we get a=−5x3−8x2=−3, and if x=1, we get a=−5x3−8x2=−13.
In summary, there are three possible pairs: (a,x)=(8,−2), (a,x)=(−3,−1) and (a,x)=(−13,1).
Solution 2: Solving the second equation for a gives us a=−5x3−8x2, thus
5x3+(−5x3−8x2)x2+8=−5x5−8x4+5x3+8=0.
The polynomial can be factorised:
−5x5−8x4+5x3+8=5x3(1−x2)+8(1−x4)=5x3(1−x2)+8(1+x2)(1−x2)=(1−x2)(5x3+8x2+8)=(1−x)(1+x)(x+2)(5x2−2x+4).
Again, we find that x=1, x=−1 or x=−2, since the quadratic factor has no real roots.
The value of a is obtained from the equation a=−5x3−8x2, so we end up with the three possibilities (a,x)=(8,−2), (a,x)=(−3,−1) and (a,x)=(−13,1) again.