Put $1 - x = y$, then
$(1 - x + x^2)^4 = (y + x^2)^44$
$=\,^{4}C_{0}\,y^{4}+\,^{4}C_{1}\,y^{3}\left(x^{2}\right)^{1}+\,^{4}C_{2}\,y^{2}\left(x^{2}\right)^{2}+\,^{4}C_{3}\,y\left(x^{2}\right)^{3}$
$+\,^{4}C_{4}\left(x^{2}\right)^{4}$
$= y^{4} + 4y^{3}\, x^{2} + 6y^{2}\, x^{4} + 4y\, x^{6} + x^{8}$
$= \left(1 - x\right)^{4} + 4x^{2}\left(1 - x\right)^{3} + 6x^{4}\left(1 - x\right)^{2} + 4x^{6}\left(1 - x\right) + x^{8}$
$= 1-4 x + 10x^{2}- 16x^{3}+ 19x^{4}- 16x^{2}+ 10x^{6}-4x^{7} + x^{8}$