if one root is purely imaginary, then the root of P(x) is in the form x = ki, k real, k =/= 0
so, sub x = ki into the equation and you get:
(k^4 -6k^2 + 8) + i(8k - 2k^3) = 0
equating imaginary parts
k(8 - 2k^2) = 0
k = +-2, since k =/= 0
hence we have factors x-2i and x+2i => x^2+4 is a factor of P(x)
divide P(x) by x^2+4 and work along to get the other roots
(roots are 2i, -2i, -1-i, -1+i)