$$6x^2-12x+3=p(x-2)$$ Where $p$ is a prime number. Find all parameters so that the equation has at least one integer root. $$$$$$$$
$$6x(x-2)+3=p(x-2)$$ $$6x+\frac{3}{x-2}=p$$ $$3(2x+\frac{1}{x-2})=p$$ because of p is a prime number $$2x+\frac{1}{x-2}=1$$ $x=1$ and $p=3$ $$$$ However, I find that there is one more solution $x=5$ and $p=31$. But How?
The step from $$3(2x+\frac{1}{x-2})=p$$
to $$2x+\frac{1}{x-2}=1$$
gives us only one solution. If p must be an integer and prime, we must have that $x-2$ divides $3$, that is, $x$ divides $5$, so either $x=1$ and $p=3$, or $x=5$ and $p=31$. Note that we can't have $x<0$, for then we would have $p<0$ which can't be prime.