The theorem says,
"Let $a,b,c$ be integers with $a$ and $b$ be both $ \text {not} \ {zero} \ $. Then the equation $ax+by=c$ has an integral solution iff $d$ divides $c$, where $d=g.c.d(a,b)$. Furthermore, if $(x_0,y_0)$ is a particular integral solution of this equation, then all integral solutions of this equations are given by $$x=x_0+(\frac{b}{d}).n \\y=y_0-(\frac{a}{d}).n $$
Now my question is if instead of $ax+by=c$, we use any of the following equations, (where sign of $a$, $b$ is negative) $$ax+(-b)y=c \\ \text {or} (-a)x+by=c \\ \text {or} (-a)x+(-b)y=c$$, would be the sign of $x_0$ and (/ or) $y_0$ changed in the integral solution?
For example when I solved this diophantine equation $$101x+12y=1$$, I got $(x_0,y_0)$ as $(5,42)$ and the integral solution became $$x=5+12n\\ y=42-101n$$. Whereas, when I solved the diophantine equation $$158x-47y=9$$, I got $(x_0,y_0)$ as $(-99,-333)$ and the integral solution was $$x=-99-47n\\ y=-333-158n$$.
On the basis of my limited exercise I have seen this fact that for a positive $b$, we get a positive $y_0$ and negative $y_0$ for a negative $b$. I am not sure about this fact too.
This is where I have doubt. Any help is greatly appreciated.
Also I was solving this $$29x-19y=114$$, where I got the integral solution $$x=228+(-19)n\\ y=342-29n$$, but answer given says $y=-342-29n$. Why does the sign of $y_0$ change here?
There is no need to assume that $(x_0,y_0)$ needs to be positive.
The theorem says "if $(x_0,y_0)$ is an integral solution, then...". This means that when you've found any such solution (which may be of negative integers), you can write the general solution using $(x_0,y_0)$.
Moreover, if you and a friend started solving the same equation, it is possible that you find positive numbers $(x_0,y_0)$ and your friend finds negative $(x_0',y_0')$ Neither of you would be wrong, this means that the general solution (which is an equation defining a set) can be expressed in two different ways (but both ways describe the same set).