Maximum value of $x$ such that $3x^2 - xy - 2x - 5y + 7 = 0$ 
Let $x, y \in \mathbb Z$ such that
  $$3x^2 - xy - 2x - 5y + 7 = 0$$
  What is the maximum value for $x$?

I tried to solve the problem by interpreting the equation as a conic section, but it took too much time and I gained no valuable information. As last resort I differentiated with respect to $x$ and tried to solve the resulting equation with respect to $y$, but I wasn't even sure about the correctness of what I was doing.
I wonder, how could one solve such a problem?
 A: $$3x^2 - xy - 2x - 5y + 7 = 0$$
is equivalent to
$$(3x-y-17)(x+5)=-92.$$
A: $$3x^2 - xy - 2x - 5y + 7 = 0$$
$$3{x^2} - y(x + 5) - 2x + 7 = 0$$
$$y = \frac{{3{x^2} - 2x + 7}}{{x + 5}} = 3x - 17 + \frac{{92}}{{x + 5}}$$
Since $y$ is integer and $3x -17$ is integer, the fractional part must be an integer. We need to pick up the largest divisor of $92$, which is obviously itself. So we have 
$$x + 5 = 92 \Leftrightarrow x = 87$$
A: Here is an approach if you don't have that much experience factorizing:
We are going to try to solve this in terms of $y$ and look at the $x$ as if it was a constant, and then determine for which values of $x$ a suitable $y$ exists.
Put the terms that have $y$ in one side:
$y(-x-5)+(3x^2-2x+7)=0\iff y(-x-5)=-(3x^2-2x+7)\iff y(x+5)=3x^2-2x+7$.
This has a solution if $x+5$ divides $3x^2-2x+7$.
So proceed to do polynomial division (this can be done with a standard algorithm, no geniality required):
You get $3x^2-2x+7=(x+5)(3x-17)+92$. From here we must have $(x+5)|92$. So the values of $x$ for which there is a solution in $y$ correspond to the divisors of $92$ minus $5$. The largest of which is $92-5=87$.
