One way to do it: Find coefficients [tex]a,b,c[/tex] such that
[tex]x^3+5x^2+3x-10=(x+4)^3+a(x+4)^2+b(x+4)+c[/tex]
[tex]=x^3+(a+12)x^2+(8a+b+48)x+(16a+4b+c+64)[/tex]
[tex]\implies\begin{cases}5=a+12\\3=8a+b+48\\-10=16a+4b+c+64\end{cases}\implies a=-7,b=11,c=-6[/tex]
So, we have
[tex]\dfrac{x^3+5x^2+3x-10}{x+4}=\dfrac{(x+4)^3-7(x+4)^2+11(x+4)-6}{x+4}[/tex]
[tex]=(x+4)^2-7(x+4)+11-\dfrac6{x+4}[/tex]
[tex]=x^2+x-1-\dfrac6{x+4}[/tex]
This can also be done with long or synthetic division. Just to verify the result above, synthetic division yields
-4 | 1 5 3 -10
. | -4 -4 4
- - - - - - - - - - - - - -
. | 1 1 -1 -6
which translates to
[tex]\dfrac{x^3+5x^2+3x-10}{x+4}=x^2+x-1-\dfrac6{x+4}[/tex]
as required.
Here, [tex]q(x)=x^2+x-1[/tex], [tex]r(x)=-6[/tex], and [tex]b(x)=x+4[/tex].