That is really impressive coding MG, the maths for it is good too. :))
-----------------------
Back to your equation though it is still not quite right.
$$\begin{array}{rrlll}\\
-6x+4&=&-2\qquad&(-4\;to\;get\;X\;alone)\\\\
-6x-4&=&-2-4\\\\
-6x&=&-6\qqquad&Divide\;6\;on\;both\;sides\\\\
\frac{-6x}{6}&=&\frac{6}{6}\qquad&simplify\\\\
\frac{-6x}{\not{6}}&=&\frac{6}{\not{6}}\\\\
-x&=&\frac{1}{1}
\end{array}$$
In your second row you 'forgot' to put the +4 in on the LHS (left hand side)
The 3rd row is good but you could have divided by -6 to get x on its own straght away.
Row 4 Your cancelling is not correct.
$$\\\frac{-\not{6}x}{\not{6}}=\frac{\not{6}}{\not{6}}\\\\
-x=\frac{1}{1}\\\\
-x=1\qquad $Multiply both sides by -1$\\
-x*-1=1*-1\\
x=-1$$
Mine is not lined up beautifully like yours but I have done some corrections :)
You must end up with x by itself on the LHS when you are finished :)