Assuming B is the final ans I will try to give a better explanation.
First off the question is about a prime number so 21 not being a prime is eliminated.
next 97 can be expressed as (96 + 1)^ 2 = 96^2 + 1 + 2*96*1
since (a + b)^2 = a^2 + b^2 + 2*a*b
so since 96 is divisible by 12 97^2/12 leaves a remainder of 1
7^2 / 12 = 49/12 leaves a remainder of 1 so the only 2 options left out are 2 and 3
2^2 / 12 leaves a remainder of 4 and
3^2/ 12 leaves a remainder of 9
but we are looking for the biggest prime number so its 3 between the 2 alternatives