by taking factors you can get the answer -4 or 6. Let me show you another way.
you should know x^2-2x+1 = (x-1)^2.
ok, as x2-2x-8=16
x2-2x=24
x2-2x+1=25 ( I have added +1 for both side)
as x2-2x+1= (x-1)2
(x-1)2= 25
getting the sqrt of both side, x-1= +5 or -5
so, x= 6 or x= -4.