You mean, I take it, 2 distinct real solutions. In that case, the equation must be of the form $(a-u)^2(a-v)= a^3- a- x= 0$. for some u and v.
Multiplying that out, we get $a^3- (2u+v)a^2+ (u^2+ 2uv)a- u^2v= a^3- a- x= 0$. We must have 2u+v= 0, $u^2+ 2uv= -1$ and $u^2v= x$. Solve the first two equations for u and v and then get x from the third equation.