This exercise is from Rosen's Elementary Number Theory:
Solve $ 2x +3y +4z = 5 $ in the set of integers.
The solution given in the book is:
"Since $(2,3)=1$, we take $z$ to be any integer $t$ and solve the equation $2x +3y = 5-4z$, which leads to the solution $x=-5+3s-2t, y= 5-2s, z=t$. ".
My approach was following:
$2x +3y = 5-4z$
Since $1= 2(-1) +3 \cdot 1 $, we have $ 5-4z = 2(-(5-4z)) + 3(5-4z) $ so particular solutions are $x_0 = -(5-4z), y_0 = 5-4z$ and then the solution is $x= (-5+4z)+3s, y= (5-4z)-2s, z=z $.
Is my approach correct, it is different from Rosen's? If it is correct, how can be proved that they are same?
Why $y$ in Rosen's solution does not depend on $t$?
Thanks in advance.