Explanation of how to get $38x+19y=3xy$ into factorised form. The core problem I would like explained is how to get:
$38x+19y=3xy$ into factorised form (not necessarily equal to zero though). 
This is the method proposed in my book:
$3xy-19y-38x=0$
Multiplying by three:
$9xy-57y-114x=0$
Then add $38(19)$ to both sides:
$9xy-57y-114x+38(19)=38(19)$
Hence, we can write:
$(3x-19)(3y-38)=2(19^2)$
I understand how each step leads to the next, but I do not understand how you would come up with this yourself. Specifically, what is the motivation for multiplying by three, or why do we want to add 38(19)?
 A: Let's frame this question in a more general way. Suppose our equation is $Ax+By=Cxy$. Then, $$Cxy-Ax-By=0$$
$$C^2xy-ACx-BCy=0$$
$$(Cx-B)(Cy-A)-AB=0$$
$$(Cx-B)(Cy-A)=AB$$
In the above example, $A=38$, $B=19$, $C=3$, and $AB=38 \times 19 = 2\times 19^2.$
A: Here's a possible path to getting to this method - the underlying assumption is that you would like to use only integers. 
You start with $3xy-19y-38x = 0$ and would like to make that equivalent to something like $(ax-b)(cy-d) = n$, with $a$ and $c$ positive; after simplification, the equation is $ac xy - bc y - ad x + (bd-n)= 0$. In the original equation there was no term without one of $x$ or $y$ present; that forces $n = bd$ and therefore $ac xy - bc y - ad x = 0$.
It would be great if one were able to find integers $a, b, c$, and $d$ such that $ac = 3$, $bc = 19$, and $ad = 38$. Unfortunately, the first condition forces one of $a$ and $c$ to be $3$, and neither 19 nor 38 are divisible by 3, so one of the latter two would be impossible to satisfy. 
However, what if you multiply the original equation by a non-zero integer, say $m$, to get to $3m  xy- 19m y - 38 m x = 0$? Then one would seek integers $a$, $b$, $c$, and $d$ such that $ac=3m$, $bc = 19m$, and $ad = 38m$. One of $a$ and $c$ would need to be divisible by 3 but now that implies that $19m$ or $38m$ need to be divisible by 3. That can be easily arranged by taking $m=3$, hence by multiplying the initial relation by $3$. 
The rest of the solution follows.
