a) Clearly, there are 24 blue vertices. If all red vertices form a single block then A=78, if they form two blocks then A=77, and similarly, if they form k blocks then A=79−k.
Besides, the number of red blocks is equal to the number of blue blocks, hence B=24−k. This implies that all possible values of (A,B) are (79−k,24−k) for k=1,2,…,24.
b) In order to have B=14 we need k=10, i.e. blue vertices form 10 blocks (and red vertices also form 10 blocks). Starting from a certain blue block, we label all blue blocks clockwise from 1 to 10. Let the numbers of vertices in blue blocks be x1,x2,…,x10, respectively.
Let yi=x1+⋯+xi then 1≤y1<y2<⋯<y9<y10=24. Hence, there are (923) possible ways to choose such y1,…,y10. In other words, 24 blue vertices can form 10 blocks in (923) possible ways. Similarly, red vertices can form 10 blocks in (978) ways.
Hence, there are (923)(978) possible ways to arrange 10 blue blocks and 10 red blocks alternating. Note that such arrangements are distinct by the rotation because 79 is a prime number. However, there are 10 ways to choose the starting block, hence the number of pairwise non-similar colorings is 10(923)(978).
□