Tangent can be expressed as opposite/adjacent. So, create a right triangle with one leg = 24 and the other = 45. The hypotenuse is 51 by the Pythagorean theorem. Cosine is adjacent/hypotenuse, so it would be 45/51.
To do this, you can just multiply across. 3 times 1 equals 3 so your numerator is 3. 2 times 4 equals 8. Then, your answer would be 3/8. Hope this helps :)