$$\eqalign{ x &\equiv 5 \mod 15\cr x &\equiv 8 \mod 21\cr}$$
The extended Euclidean algorithm gives $x≡50 \bmod 105$.
How/why? I am trying to understand how this is true when the Euclidean algorithm typically needs only two inputs $a,b$. I see four numbers in these two congruences.
$x \equiv 5 \bmod 15$ means that $x=5+15a$.
$x \equiv 8 \bmod 21$ then means that $5+15a=8+21b$.
So, you're looking for $a,b$ such that $15a-21b=3$.
Here enters the extended Euclidean algorithm.
We get $a=3$ and $b=2$ and so $x=50$. This solution is unique mod lcm$(15,21)=105$.