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