<s>[INST] $y^2+5xy+6x^2-9x-4y=0$ where $x$ and $y$ are integers Need some help solving this for integers $x$ and $y$:
$$
y^2+5xy+6x^2-9x-4y=0
$$
I managed to make something like this:
$$
(y+3x-4)(y+2x)=x\\
(y+3x)(y+2x-3)=y
$$
Find integers for $x$ and $y$ that satisfy the equations above.
But, what do I do next, or is this a bad approach?
 [/INST] We have $$(y+3x)(y+2x)-(9x+4y)=0$$
so if we put $a=y+3x$ and $b=y+2x$ we get $$ab-a-3b=0\implies b={a\over a-3}$$
so $a-3\mid a$ and thus $a-3\mid 3$ so $a-3\in\{-3,-1,1,3\}$ so $a\in\{0,2,4,6\}$ and corresponding $b\in\{0,-2,4,2 \}$ Now for each pair $(a,b)$ solve for $x$ and $y$...
</s>