Solution (source code)

= Solution

The <Euclidean algorithm> repeatedly replaces a pair $(a,b)$ by $(b,a-qb)$ without changing its <greatest common divisor>. Reversing the divisions expresses $\gcd(a,b)$ as an integer linear combination $\alpha a+\beta b$, which is <Bezout identity>[Bézout's identity].

Here $3=3(15)-2(21)$, and therefore
$$
1=12\cdot3-35=36(15)-24(21)-35.
$$
One solution is $(x,y,z)=(36,-24,-1)$. It is not unique: for every $t\in\mathbb Z$, $(x,y,z)=(36+7t,-24-5t,-1)$ is another solution.