<s>[INST] Find the last three digits of $p$ if the equations $x^6 + px^3 + q = 0$ and $x^2 + 5x - 10^{2013} = 0$ have common roots. 
Find the last three digits of $p$ if the equations $x^6 + px^3 + q = 0$ and
  $x^2 + 5x - 10^{2013} = 0$  have common roots. 

Let $a,b $ be the solutions of second equation, then by Vieta we have $a+b =-5$ and $ab=-10^{2013}$
Since $ a^6+a^3p+q=0$ and $b^6+b^3p+q=0$ we have $ a^6-b^6+p(a^3-b^3)=0$ so $ -p = a^3+b^3 = (a+b)(a^2-ab+b^2)$
So $ p = 5((a+b)^2-3ab) = 5(25+3\cdot 10^{2013})$ and thus last three digits are $125$.
 [/INST] Your proof is entirely correct, though you might want to clarify two things:


*

*First, that if the two polynomials have a common root, then they have two common roots.

*Second, that $a^3-b^3\neq0$ when dividing by $a^3-b^3$ to deduce that $-p=a^3+b^3$.

</s>