<s>[INST] Where am I going wrong in my linear Diophantine solution? Let $-2x + -7y = 9$. We find integer solutions $x, y$.
These solutions exist iff $\gcd(x, y) \mid 9$. So,
$-7 = -2(4) + 1$
then
$-2 = 1(-2)$
so the gcd is 1, and $1\mid9$. OK.
In other words,
$(-7)(1) + (-2)(-4) = 1$
Multiply by 9 on each side to get
$(-7)(9) + (-2)(-36) = 9$
$\begin{align} a = -7\\
x_0 = 9\\
b = -2\\ 
y_0 = -36\\
\end{align}$
Then we end up with
$x' = 9 - 7t, y' = -36 + 2t$
But when $t = 2$, we get $x'(2) = 9 - 7(2) = -5$ and $y'(2) = -36 + 2(2) = -32$ but clearly that's not a solution....
Where am I going wrong?
 [/INST] 1125588
$-2x-7y=9$
$2x+7y=-9$
$2x=-9-7y$
$x={-\frac{9+7y}2}=-5-4y+{\frac{1+y}2}$
New variable: $a={\frac{1+y}2}$
$y={2a-1}$
$x=-\frac{9+7(2a-1)}2=\frac{-9-14a+7}2=-1-7a$   
Check it out: $-2(-1-7a)-7(2a-1)=2+14a-14a+7=9$
</s>