Solving an algebraic expression by taking common factors

First of all, I'd like to apologize for this question because I'm sure the answer is simple, I'm just a bit rusty on basic algebra skills after being out of practice for so long. I can't seem to work out what's happening on line 4 of this example:

Image of example here

\begin{align*} x={}&\frac{y}{1-3y}+2 \\ \implies\hspace{1.8cm} x-2={}&\frac{y}{1-3y} \\ \implies(x-2)(1-3y)={}&y \\ \implies-3(x-2)y-y={}&2-x \\ \implies\hspace{2.6cm} y={}&\frac{2-x}{5-3x} \\ \implies\hspace{1.7cm} h^{-1}(x)={}&\frac{2-x}{5-3x}=\frac{x-2}{3x-5}. \end{align*}

I can see some factorization has been done, but I really can't grok the whole thing. Is anyone willing to explain it?

The writer went a little fast and skipped a step

$$(x-2)(1-3y)=y$$ $$(x-2)-3(x-2)y=y$$ $$-3(x-2)y-y=-(x-2)$$

Alternatively,

$$x=\frac y{1-3y}+2.$$

Multiply by $1-3y$

$$x(1-3y)=x-3xy=y+2(1-3y)=2-5y.$$

Move all $y$ terms to the right

$$x-2=3xy-5y.$$

Divide by $3x-5$, $$y=\frac{x-2}{3x-5}.$$