I have the following equation:
$px + qy = 1$
$p,q$ are coprime integers and $x,y$ are integers. Given a specific pair of $p,q$, I want to find a pair of integers $x,y$.
It was quite easy to prove that for any given $p,q$, there are infinitely many pairs of $x,y$.
One can also see that if $x_1, y_1$ works, $x_1 + nq, y_1 - np$ also works for any integer $n$. I have been racking my brains for weeks now, but I can't seem to find a way to find $x,y$ without bruteforce.
P.S: This is a problem I came up with by myself, so I don't know what (if any) textbook I could refer to.