When graphed in the usual x-y plane: tan θ = y/x.
tan θ = y/x and tan θ = 9/5 (if you assume that the angle is in the first quadrant).
The Pythagorean Theorem applies with x2 + y2 = r2 ---> 52 + 92 = r2
---> 25 + 81 = r2 ---> 106 = r2
: r = √106.
sec θ = 1/ cos θ and cos θ = x/r ---> cos θ = 5/√106
---> sec θ = √106/5.
However, the angle could be in the third quadrant which makes y = -9 and x = -5.
r is still √106, but cos θ = -5/√106 and sec θ = - √106/5.
This was corrected after notes from Melody and Alan -- thank you.