The synthetic division table is:
$$ \begin{array}{c|rrrr}-5&39&-4&0&38\\& & -195& 995& \color{black}{-4975} \\ \hline &\color{blue}{39}&\color{blue}{-199}&\color{blue}{995}&\color{orangered}{-4937} \end{array} $$The solution is:
$$ \frac{ 39x^{3}-4x^{2}+38 }{ x+5 } = \color{blue}{39x^{2}-199x+995} \color{red}{~-~} \frac{ \color{red}{ 4937 } }{ x+5 } $$Step 1 : Write down the coefficients of the dividend into division table. Put the zero from $ x + 5 = 0 $ ( $ x = \color{blue}{ -5 } $ ) at the left.
$$ \begin{array}{c|rrrr}\color{blue}{-5}&39&-4&0&38\\& & & & \\ \hline &&&& \end{array} $$Step 1 : Bring down the leading coefficient to the bottom row.
$$ \begin{array}{c|rrrr}-5&\color{orangered}{ 39 }&-4&0&38\\& & & & \\ \hline &\color{orangered}{39}&&& \end{array} $$Step 2 : Multiply by the number on the left, and carry the result into the next column: $ \color{blue}{ -5 } \cdot \color{blue}{ 39 } = \color{blue}{ -195 } $.
$$ \begin{array}{c|rrrr}\color{blue}{-5}&39&-4&0&38\\& & \color{blue}{-195} & & \\ \hline &\color{blue}{39}&&& \end{array} $$Step 3 : Add down last column: $ \color{orangered}{ -4 } + \color{orangered}{ \left( -195 \right) } = \color{orangered}{ -199 } $
$$ \begin{array}{c|rrrr}-5&39&\color{orangered}{ -4 }&0&38\\& & \color{orangered}{-195} & & \\ \hline &39&\color{orangered}{-199}&& \end{array} $$Step 4 : Multiply by the number on the left, and carry the result into the next column: $ \color{blue}{ -5 } \cdot \color{blue}{ \left( -199 \right) } = \color{blue}{ 995 } $.
$$ \begin{array}{c|rrrr}\color{blue}{-5}&39&-4&0&38\\& & -195& \color{blue}{995} & \\ \hline &39&\color{blue}{-199}&& \end{array} $$Step 5 : Add down last column: $ \color{orangered}{ 0 } + \color{orangered}{ 995 } = \color{orangered}{ 995 } $
$$ \begin{array}{c|rrrr}-5&39&-4&\color{orangered}{ 0 }&38\\& & -195& \color{orangered}{995} & \\ \hline &39&-199&\color{orangered}{995}& \end{array} $$Step 6 : Multiply by the number on the left, and carry the result into the next column: $ \color{blue}{ -5 } \cdot \color{blue}{ 995 } = \color{blue}{ -4975 } $.
$$ \begin{array}{c|rrrr}\color{blue}{-5}&39&-4&0&38\\& & -195& 995& \color{blue}{-4975} \\ \hline &39&-199&\color{blue}{995}& \end{array} $$Step 7 : Add down last column: $ \color{orangered}{ 38 } + \color{orangered}{ \left( -4975 \right) } = \color{orangered}{ -4937 } $
$$ \begin{array}{c|rrrr}-5&39&-4&0&\color{orangered}{ 38 }\\& & -195& 995& \color{orangered}{-4975} \\ \hline &\color{blue}{39}&\color{blue}{-199}&\color{blue}{995}&\color{orangered}{-4937} \end{array} $$Bottom line represents the quotient $ \color{blue}{ 39x^{2}-199x+995 } $ with a remainder of $ \color{red}{ -4937 } $.