$\require{enclose}$
Below is an intuitive explanation of how back-substitution works in the extended Euclidean algorithm. In the top line of the diagram below we compute your $\,\gcd(256,123)$ using the common remainder based version of Euclidean algorithm $\,\gcd(a,b) = \gcd(b,\:\!a\bmod b)\ $ if $\, a\ge b$.

The second row in the diagram shows the remainder (mod) reductions used in each step, e.g. the first is one is $\,256\bmod 123 = 10,\,$ via $\,256 - 2\cdot 123 = 10,\,$ and the second one is $\, 123-12\cdot 10 = 3.\,$ The algorithm terminates when we reach $\,10\bmod \color{#c00}3 = 1$ via $\,10-3\cdot\color{#c00} 3 = 1,\,$ a Bezout equation for $\,\gcd(10,\color{#c00}3)=1$. Next we reverse the Euclidean steps to convert this to a Bezout equation for $\,\gcd(256,123) = 1$. The first back substitution step ${\textstyle \enclose{circle}{1\:\!}}$ reverses the reduction step $\,\gcd(123,10)\to \gcd(10,3)$, which used $\,123-12\cdot 10 = 3$ to replace $123$ by $3$. Reversing, we use the equation to replace $\,3\,$ by $\,123\,$ by substituting $\,\color{#c00}3 = 123-12\cdot 10\,$ into $\,10-3\cdot\color{#c00}{3}=1\,$ to get $\, -3\cdot 123 + 37\cdot 10 = 1,\,$ our Bezout equation for $\,\gcd(123,10)=1.\,$ Back step ${\textstyle \enclose{circle}{2\:\!}}$ proceeds similarly, we reverse the first step $\,\gcd(256,123) = \gcd(123,10)\,$ using $\, 256-2\cdot 123 = \color{#0a0}{10}\,$ by substituting for $\color{#0a0}{10}$ in our Bezout equation for $\,\gcd(123,\color{#0a0}{10}),\,$ viz $\,-3\cdot 123 + 37\cdot\color{#0a0}{10} = 1,\,$ yielding $\,37\cdot 256 - 77\cdot 123 = 1,\,$ the sought Bezout equation for $\,\gcd(256,123) = 1$.
Remark $ $ Worth strong emphasis: this back-substitution method is notoriously error prone. To remedy this we can instead use the forward version described here and its links, or its fractional form. For example see answers here or here.