The definition of a unit vector is that it has a magnitude equal to 1. We find the magnitude of a vector v = ai + bj + ck using the distance formula,
||v|| = sqrt(a^2 + b^2 + c^2)
So, if v is a unit vector, ||v|| = 1,
1 = sqrt(a^2 + b^2 + c^2)
For your vector, you have a = 0.4 and b = 0.8. Let's plug those in to find the value of c.
1 = sqrt(0.4^2 + 0.8^2 + c^2)
1^2 = 0.4^2 + 0.8^2 + c^2
1 - 0.4^2 - 0.8^2 = c^2
c = ±sqrt(1 - 0.4^2 - 0.8^2)
c = ±sqrt(1 - 0.16 - 0.64)
c = ±sqrt(0.2)