The polynomial remainer theorem says that a polynomial [tex]p(x)[/tex] leaves a remainder of [tex]p(c)[/tex] when divided by [tex]x-c[/tex]. When [tex]x=2[/tex], we have
[tex]2x^3+ax^2+3x-5=4a+17[/tex]
[tex]x^3+x^2-2x+a=a+8[/tex]
Both operations leave the same remainder, which means
[tex]4a+17=a+8\implies3a=-9\implies\boxed{a=-3}[/tex]
Then the remainders are both 5.