12 mod 7 == 5 bacause 5 is the difference when you find the largest multiple of 7 that is less than 12 (i.e., 7 itself).
To find what 7 mod 12 is, note that 0 is a multiple of any number. So, now, 0 is the largest multiple of 12 that lies just below 7, and the remainder is 7 itself.
This should be obvious from the reasoning that you are asking what hour 7 refers to on a 12 hr clock.
