Draw a right triangle.
Call one of the angles A.
A=Arctan(2/2)
Take tangent of both sides.
tan(A)=tan(Arctan(2/2))
tan(A)=2/2
So now we have a triangle with angle A with the opposite side being 2 units long, and adjacent side of angle A being 2 units long (tangent = opposite/adjacent). So the hypotenuse of the triangle will be sqrt((2^2)+(2^2)) by theorem of Pythagoras.
Now it's a matter of finding of cos(A).
Keep in mind that cos A = cos(Arctan x).
cosine=adjacent/hypotenuse.
Acknowledged. I understand that the tradition has to do with pre-calculator days. After high school, rationalizing the denominator and other conventional presentation is seldom necessary, and almost never required by the profs. As long as the answer is presented understandably with shown work, all is good.