For example, I have two integer $A=9, B=15$. Here the $\gcd(9,15) = 3$.
If I take two integer $x=2$ and $y=-1$ then $9\cdot2 + 15\cdot(-1)$ will be equal to $3$ which is $\gcd(9,15)$.
So, what will be the general formula to find the value of $x$ and $y$ for any given $A$ and $B$?