408 = 8*51 = (2^3)*3*17
1032 = 8*129 = (2^3)*3*43
Therefore HCF is (2^3)*3 = 24
The (Diophantine) eqn is: 408X + 1032Y = 24
i.e. 17X + 43Y = 1 (there shouild be no common factors here) ---------------- (1)
Taking the factors 43 and17,
43 = 2 * 17 + 9 ---- (2)
17 = 1 * 9 + 8 -----(3)
9 = 1 * 8 + 1 ------(4)
From (4), 1 = 9 - 1 * 8
now substitute for 8 from (3), giving
1 = 9 - 1 * (17 - 1 * 9)
1 = 2 * 9 - 17
now substitute for 9 from (2), giving
1 = 2 * (43 - 2 * 17) - 17
1 = -5 * 17 + 2 * 43 ------------------------(5)
Comparing (5) with (1), a pair of values for X and Y are (X,Y) = (-5, 2)
Although you don't need it, the general solution would be,
X = -5 + a*K
Y = 2 - b*K
where a is the coefft of Y, and b is the coefft of X, in (1). i.e. a = 43, b = 17