The cos of Angle B is defined, in this case, as the length of BC divided by the length of the hypotenuse AB, which is 5. Some think of the cosine as the adjacent side over the hypotenuse.
We can use the Pythagorean Theorem to determine the length of BC, or you may recognize this as a standard right triangle. Let's not assume anything.
x: length of BC
hypotenuse: C = 5
y: length of AC = 3
C2 = x2 + y2
52 = x2 + 32
25 = x2 + 9
25 – 9 = x2 + 9 – 9
16 = x2
4 = x
So the length of BC is 4, and cosB = 4/5 = 0.8