Evaluating definite integral of $p(x)$
Note that if $(x-1)^3$ divides $p(x)+1$, then $(x-1)^2$ divides $p^{\prime}(x)$
Similarly,
if $(x+1)^3$ divides $p(x)-1$, then $(x-1)^2$ divides $p^{\prime}(x)$
Since given that the degree is $5$ then when we differentiate it becomes $4$.
Therefore, $p^{\prime}(x)=t(x+1)^2(x-1)^2=t(x^4-2x^2+1)$ where $t\in\mathbb{R}$
Then $$p(x)=\dfrac t5x^5-\dfrac{2t}{3}x^3+tx+b\mbox{ $\{$ for $b\in\mathbb{R}$\}$$}$$
Since $(x+1)^3$ divides, we have $$p(-1)=-\frac a5+\dfrac{2a}{3}-a+b=1......(1)$$
Since $(x-1)^3$ divides, we have $$p(1)=\dfrac a5-\dfrac{2a}{3}+a+b=-1.......(2)$$
Now add $(1)+(2)$ gives $b=1$ and $a=-\dfrac{15}{8}$
Therefore, $p(x)=-\dfrac38x^5+\dfrac54x^3-\dfrac{15}{8}x$
Now $$\int_{-10}^{10}p(x)dx=\int_{-10}^{10}\left(-\dfrac38x^5+\dfrac54x^3-\dfrac{15}{8}x\right)dx=0$$
Thanks to @KeyFlex answer, if both $(x-1)^2$ and $(x+1)^2$ divide $p^{\prime}(x)$, then since $p'$ is degree $4$ so $$p'(x)=k(x^2-1)^2$$ for a real $k$, hence $p'$ is even and then $p$ is odd which concludes $$\int_{-10}^{10}p(x)dx=0$$