$x-a$ is a factor of $x^4 - 2x^3 + 8x^2 - 14x + 7$ if and only if $a^4 - 2a^3 + 8a^2 - 14a + 7=0.$ Integers that can work are the divisors of $7$ (the independent term). That is: $\pm 1,\pm 7.$ If we check with $x=1$ we get
$$1^4 - 2\cdot 1^3 + 8\cdot 1^2 - 14\cdot1 + 7=0.$$ So $x-1$ is a factor. That is, there exists a polynomial $p(x)$ of degree $3$ such that $$x^4 - 2x^3 + 8x^2 - 14x + 7=(x-1)p(x).$$
To get $p(x)$ you have to divide $(x^4 - 2x^3 + 8x^2 - 14x + 7):(x-1)$ in the way you prefer.
You should get
$$(x^4 - 2x^3 + 8x^2 - 14x + 7)=(x-1)(x^3-x^2+7x-7).$$
Proceeding in the same way you have
$$x^3-x^2+7x-7=(x-1)(x^2+7).$$ Or
$$(x^4 - 2x^3 + 8x^2 - 14x + 7)=(x-1)^2(x^2+7).$$