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?
If you let $t=0,$ you can see the problem is still there. The issue is that $x_0$ and $y_0$ are the wrong way around: there was a switch after $9$ has been expressed as a linear combination of $-2$ and $-7.$ Since the original equation is $$-2x-7y = 9,$$ and you've shown that $$-2(-36) -7(9) =9,$$ we must have $x_0=-36,y_0=9,$ rather than vice versa.