\[ab - a^{2}b^{2} + a^{3}b^{3} - c + abc - ca^{2}b^{2} =\]
\[= \text{ab}\left( 1 - ab + a^{2}b^{2} \right) - c\left( 1 - ab + a^{2}b^{2} \right) =\]
\[= \left( 1 - ab + a^{2}b^{2} \right)(ab - c)\mathbf{.}\]