Find all the values of $k$, if any, such that $f=t^4+2t^3-3t^2+2kt+k^2$ is divisible by $g=t+2$ in $\mathbb{Z}_{7}[t]$ 
Find all the values of $k$, if any, such that $f=t^4+2t^3-3t^2+2kt+k^2$ is divisible by $g=t+2$ in $\mathbb{Z}_{7}[t]$.

I solve it in the normal way but I do not sure that my way is correct or not as I am not familiar with the congruent modulo.
First, $f$ is divisible by $t+2$ if and only if $f(-2)=0$
So I substitute $-2$ into $f$ and get $k^2-4k-12=0$.
So by usual factorization, I get $k=6,-2$.
 A: Let $F$ be a field, then the ring $F[t]$ is a euclidean domain - ie, you can do long division. What this means, is that for any polynomials $f(t),g(t)\in F[t]$, there exist unique polynomials $h(x),r(x)$ such that $f(t) = h(t)g(t) + r(t)$, and $\deg r(t) < \deg g(t)$. This is basically the statement of long division, ie, that $r(t)$ is the remainder when dividing $f(t)$ by $g(t)$.
This means that $g(t)$ divides $f(t)$ iff $r(t) = 0$. If $g(t)$ is of the form $t-a$ for some $a\in F$ (so it's a degree 1 polynomial), then $r(t)$ must be degree 0, hence it must be a constant (so we can just call it $r$). In this case, we can consider the case $t = a$ in the formula
$$f(t) = h(t)g(t) + r(t),\quad \text{ie}\qquad f(t) = h(t)(t-a) + r(t)$$
If $t = a$, then $g(a) = a-a = 0$, so $f(a) = h(a)\cdot 0 + r(a) = r$. Thus, this shows that if $g(t) = t-a$ for some $a\in F$, that $r = 0$ iff $f(a) = 0$. In other words, $g(t)$ divides $f(t)$ iff $f(a) = 0$.
Thus, to answer your question yes all you need to do is find for which $k$ we have $f(-2) = 0$, which you've done correctly.
