7. Given the sets $A=\left\{2,4, a^{3}-2 a^{2}-a+7\right\}, B=\left\{-4, a+3, a^{2}-2 a+2, a^{3}+a^{2}+3 a+7\right\}$, and $A \cap B=\{2,5\}$, then the set of possible values of $a$ is $\qquad$ .
7. $a=-1$ is obtained by solving $a^{3}-2 a^{2}-a+7=5$, which yields $a=-1,1,2$. Calculate the sets $A$ and $B$ respectively and check if they satisfy $A \cap B=\{2,5\}$.