I don't know how

y-1=-1/3(x-3)
is simplifes to
x+3y-6=0

The first step should be to multiply out the right side, giving you

y - 1 = -x/3 + 1.

That can be rearranged to
x/3 + y -2 = 0.

Multiply both sides by 3 (a permitted operation) to get your last equation.