
Concept: When a division is split in to a sum of 2 division's( with the same divisor as the original divisor), the original remainder will be equal to sum of the remainders of 2 individual divisions.
A1 = A2+A3
Rem(A1/x) = Rem(A2/x)+Rem(A3/x)
Over here,
7M = 12a+8 => 7(a+1) + 5a + 1
Divide on both sides with 7
Rem(7M/7) = Rem(7(a+1)/7) + Rem (5a/7) + Rem (1/7).
Rem(7M/7) = 0
Rem(7(a+1)/7)= 0
Rem(1/7) = 1
Therefore from the above concept mentioned to neutralise the 1
Rem(5a/7) = 1(i.e. 6).
This way the problem is solved.
Hope this helps you. 