The problem is to solve
\frac{dy}{dx}= \frac{3x- y+ 1}{x+ y+ 1}
What franky2727 has done is to set u= 3x- y+1 and v= x+ y+ 1 so that, from the equation, y'= u/v. Then from the first equation u'= 3- y'= 3- u/v. I frankly don't see how adding more variables is going to help, especially since he then defines z= u/v so he winds up with a total of 5 variables!
franky2727, rewrite your equation as (x+y+ 1)dy = (3x-y+1)dx so that (x+y+1)dy- (3x-y+1)dx= (x+y+1)dy+ (-3x+ y- 1)dx= 0. Since (x+y+1)x= 1= (-3x+y-1)y, that is an exact equation. That is, there exist F(x,y) so that
dF= \frac{\partial F}{\partial y}dy+ \frac{\partial F}{\partial x}dx= (x+y+1)dy+ (-3x+ y- 1)dx
Since dF= 0, F(x,y)= constant. Do you know how to find F from
\frac{\partial F}{\partial y}= x+ y+ 1
and
\frac{\partial F}{\partial x}= -3x+ y- 1?