Find the solution for $x$ with $0 \le x \lt 13$ so $13 \mid 3x^2+9x+7 $. Find the solution for $x$ with $0 \le x \lt 13$ so $13 \mid 3x^2+9x+7 $.
I got this question in my discrete mathematics class.
I don't really get the idea how 13 can divide $3x^2+9x+7 $ 
All of my friend told me to try all the number between 0 and 12, but I know that's not how to solve this question.
Can anyone help me?
Thanks.

Let's work in $\mod 13$. We want $3x^2+9x+7 \equiv 0 \pmod {13}$.  Now $7 \equiv -6$ so you have $3x^2+9x-6 \equiv 0 \pmod {13}$. Because $\gcd(3, 13) = 1$, we can "divide both sides" by $3$ and get $x^2+3x-2 \equiv 0 \pmod {13}$
Notice that $-2 \equiv -28$, so $x^2+3x-28 \equiv 0 \pmod {13}$ which you can factor to $(x-4)(x+7)\equiv 0 \pmod {13}$. Because $13$ is prime, we have $x \equiv 4$ or $x \equiv -7 \equiv 6$.
