Read the solution carefully and you will understand.
Hcf (4052, 12576) = h
12576 = 3 * 4052 + 420
4052 = 420 * 9 + 272
420 = 272 * 1 + 148
272 = 148 * 1 + 124
148 = 124 * 1 + 24
124 = 5 * 24 + 4
24 = 6 * 4 + 0
HCF is diviser when remainder=0
So 4 is the HCF.
4 = 124 - 5 * 24
= 124 - 5 * (148 - 124)
= 6 * 124 - 5 * 148
= 6 * (272 - 148) - 5 * 148
= 6 * 272 - 11 * 148
= 6 * 272 - 11 * (420 - 272)
= 17 * 272 - 11 * 420
= 17 * (4052 - 420 * 9) - 11 * 420
= 17 * 4052 - 164 * 420
= 17 * 4052 - 164 * (12576 - 3 * 4052)
= 509 * 4052 - 164 * 12576
So a = 509 and b = -164.