So I'm a programmer and have reduced solving some problem to finding values x and y such that $x+y*A \equiv B \pmod{2^{32}}$ with the requirement that $x<2^{16}$, $y<2^{16}$, and $\gcd(A,2^{32}) = 1$.

Intuitively, it seems like there should only be one pair $(x,y)$ which satisfies this equation. This looks like a linear algebra problem of writing $B$ in terms of the basis vectors $1$ and $A$ multiplying by coefficients $x$ and $y$. In practice, it also turns out that just by brute forcing over all $2*2^{16}$ values I do get only one solution.

This is perfectly fine as a solution, but it's bothering me that I can't figure out why there is only one $(x,y)$ pair.

Also, is there some closed-form solution to find $x$ and $y$ faster than brute force?