Well..it depends upon which side the "5" is
If it's the hypotenuse, we have
cos40 = a/5 where a is the adjacent side.......so
a = 5cos40 = about 3.83
If "5" is the adjacent side, we have
cos40 = 5/ h where h is the hypotenuse ......so.......
h = 5/cos40 = about 6.527
