You can construct a triangle with an angle A and opposite side 5 with hypotenuse 13.

You can then use Pythagoras Theorem to find the missing side which turns out to be 12.

We can then say cos(A) = adj/hyp = 12/13

I'm not too sure how the quadrants come into it so you may want to wait for someone more experienced with that part