Ok, with a bit less flailing
54x+15y=6 ; simplify it by dividing any common factors, in this case 3
18x+5y=2 ; rewrite this to eliminate one variable via modulo arithmetic
5(3x+y) + (3x-2) = 0 ==> 3x-2 = 0 (mod 5) ; now solve this relatively simple modulo equation
3*4-2 = 10 = 0 (mod 5) so x=4
Now to solve for y simply plug in x above
18(4)+5y=2
5y=-70
y=-14
Hi,
You should know a systematic way to find a particular solution of ax + by = c. Such a Diophantine equation has a solution if and only if gcd(a,b) divides c. So in this case divide both sides by the gcd. to arrive at an equation of the form ax + by = c with gcd(a,b) = 1. Now use the extended Euclidean algorithm to find m and n with am + bn = 1. Then x=cm and y=cn satisfy the original equation.
Example:
54x + 15y = 6 yields 18x + 5y = 2.
By the Euclidean algorithm, 18(2) + 5(-7) = 1
So x=4 and y=-14 is a particular solution.