keeping in mind that i² = -1,
[tex]\bf \begin{array}{c|ccccc}
-1+i&&1&5&1&4\\
&&&-1+i\\ &&---&--&--&--\\
&&1&4+i
\end{array}\\\\
-------------------------------\\\\
(-1+i)(4+i)\implies -4-i+4i+\stackrel{-1}{i^2}\implies -4-i+4i-1
\\\\\\
-5+3i\\\\
-------------------------------[/tex]
[tex]\bf \begin{array}{c|ccccc}
-1+i&&1&5&1&4\\
&&&-1+i&-5+3i\\
&&---&---&----&--\\
&&1&4+i&-4+3i
\end{array}\\\\
-------------------------------\\\\
(-1+i)(-4+3i)\implies 4-3i-4i+3\stackrel{-1}{i^2}\implies 4-3i-4i-3
\\\\\\
1-7i\\\\
-------------------------------\\\\
\begin{array}{c|cccccc}
-1+i&&1&5&1&4\\
&&&-1+i&-5+3i&1-7i\\
&&---&---&----&---\\
&&1&4+i&-4+3i&\boxed{5-7i}&\leftarrow remainder
\end{array}[/tex]
recall that a factor of the expression, gives a remainder of 0, and this one doesn't.