Cosine is the ratio of the adjacent side to the hypotenuse.
In short, we have this equation
cos(angle) = adjacent/hypotenuse
In the case of cos(A) = 18/19.5 we can see that
adjacent = 18
hypotenuse = 19.5
The side of 18 cm is next to angle 2, so the 18 cm side is adjacent to angle 2 (in contrast, the 7.5 cm side is the opposite leg in relation to angle 2)
So that's why the answer is angle 2
In other words, replace the '2' angle marker with 'A' to be able to write cos(A) = 18/19.5