We know that x = 8 and y = -7
r = sqrt [ (8^2 + (-7)^2 ] = sqrt [ 64 + 49] = sqrt [ 113]
So.....cos (theta) = x / r = 8 / sqrt (113)
Multiply both numerator and denominator by sqrt [ 113] and we have
8 sqrt (113) 8sqrt (113)
_________________ = __________
sqrt(113) * sqrt (113) 113