Since "Sine" is Opposite/Hypotenuse and Cosine is adjacent hypotenuse...
The opposite of angle A is 12, and the hypotenuse is 12, therefore making 12/13.
The adjacent of angle B is 12, (The adjacent side is the side next to the opposite that is not the hypotenuse) and the hypotenuse is 13, therefore making 12/13. (The hypotenuse never changes no matter how you look at the triangle.)