Let x denote the length of the shorter leg. Then the longer leg has length 2x. The hypotenuse of the triangle has length √(x² + (2x)²) = √5 x.
The cosine of the angle formed by the longer leg and the hypotenuse is 2x/(√5 x) = 2/√5 = 2√5 / 5
The cosine of the other acute angle is x/(&radc;5 x) = 1/√5 = √5 / 5