I have found the $\gcd(408,126) = 6$. Now I am using Bézout's identity to find the coefficients.
a) $408 = 3 * 126 + 30$
b) $126 = 4 * 30 + 6$
Now
$6 = 126 – (4 ·30)$ (1)
$ = 126 – 4 ·(408 – 3 ·126)$ (2)
Now the next statement is where I am lost. I don't understand how $(1 + 12)$ was found.
$= (– 4) ·408 + (1 + 12) ·126$ (3)
$= (– 4) ·408 + 13 ·126$ (4)
I was able to reach step number 2 on my own, but that's when I got stuck. I searched for the solution on google. that's when I found step (3) and (4). Can someone help me understand what's going on here?