If #x+5# is a factor, your divisor in synthetic substitution is #-5#.
Step 1. Write only the coefficients of #x# in the dividend inside an upside-down division symbol.
#color(white)(Xll)|1color(white)(Xll)9color(white)(XX)24color(white)(XXl)20#
#color(white)(XX)|#
#color(white)(XX)stackrel("—————————————)#
Step 2. Put the divisor at the left.
#color(blue)(-5)|1color(white)(Xll)9color(white)(XX)24color(white)(XXl)20#
#color(white)(XX)|#
#color(white)(XX)stackrel("—————————————)#
Step 3. Drop the first coefficient of the dividend below the division symbol.
#-5|1color(white)(Xll)9color(white)(XX)24color(white)(XXl)20#
#color(white)(XX)|#
#color(white)(XX)stackrel("—————————————)#
#color(white)(Xll)|color(blue)(1)#
Step 4. Multiply the result by the divisor, and put the product in the next column.
#-5|1color(white)(Xll)9color(white)(XX)24color(white)(XXl)20#
#color(white)(Xll)|color(white)(Xl)color(blue)(-5)#
#color(white)(XX)stackrel("—————————————)#
#color(white)(Xll)|1#
Step 5. Add down the column.
#-5|1color(white)(Xll)9color(white)(XX)24color(white)(XXl)20#
#color(white)(Xll)|color(white)(ll)-5#
#color(white)(XX)stackrel("—————————————)#
#color(white)(Xll)|1" "color(white)(l)color(blue)(4)#
Step 6. Repeat Steps 4 and 5 until you can go no farther.
#-5|1color(white)(Xll)9color(white)(XX)24color(white)(XXl)20#
#color(white)(Xll)|color(white)(ll)-5color(white)(1)-20color(white)(1)-20#
#color(white)(XX)stackrel("————————————)#
#color(white)(Xll)|1" "color(white)(l)4" "color(white)(Xl)4" "color(white)(Xl)color(red)(0)#
∴ #(x^3+9x^2+24x+20)/(x+5) = x^2 + 4x +4#
You can factor the quadratic as #x^2 + 4x + 4 = (x+2)(x+2)#
So
#x^3+9x^2+24x+20 = (x+5)(x+2)(x+2)#