For an algebraically closed field $k$, an ideal $I$ of $k[x]$ is maximal if and only if $I = (x-c)$ This is an exercise $4.21$ on a page $155$ from a textbook "Algebra: Chapter $0$" by P.Aluffi.

Let $k$ be an algebraically cloased field, and let $I \subseteq k[x]$ be an ideal. Prove that $I$ is maximal if and only if $I = (x-c)$ for some $c \in k$.

So, I tried to prove that $(x-c)$ is maximal. Assume that $J$ is an ideal of $k[x]$ containing $(x-c)$. We know that if $k$ is a field, then $k[x]$ is a PID. So $J = (f(x))$ for some polynomial $f(x) \in k[x]$.
$(x-c) \subseteq (f(x))$
We know that there is $g(x) \in k[x]$ such that $x-c = f(x)g(x)$. Since $k$ is algebraically closed, $f(x)$ has a root $a \in k$. So a - c = f(a)g(a) = 0$, so $a = c$.
Now we divide $f(x)$ by $(x-c)$ with remainder: $f(x) = q(x)(x-c) + r$. Since $f(c) = r$ and $f(c) = 0, r = 0$. So, $f(x) = q(x)(x-c)$.
What can be done next?
 A: Let me first answer your question "What can be done next?".
Note that at that point you're still busy proving that $(x - c)$ is maximal. You've established $f(x) = q(x) (x - c)$. So, continuing your argument: $f(x) \in (x - c)$ and therefore $(f(x)) \subseteq (x - c)$. You already had $(x - c) \subseteq (f(x))$, so $(f(x)) = (x - c)$.
One small detail: the ideal $J$ you started with could be equal to $(1)$. You're missing that case at the point that you say "Since $k$ is algebraically closed, $f(x)$ has a root $a \in k$.". Of course, you should assume $J$ to be unequal to $(1)$, and then it is indeed generated by a non-constant $f(x)$.
Now, as can be seen from the other answers and comments, this is a complicated way to prove that $(x - c)$ is maximal. An easier reasoning is as follows: $k[x] / (x - c) \cong k$, so it's a field. Therefore $(x - c)$ is maximal. Note that this also doesn't need $k$ to be algebraically closed.
To prove that all maximal ideals are of the form $(x - c)$, you do need the assumption that $k$ is algebraically closed. So, take a maximal ideal $J$. Because $k[x]$ is a p.i.d., it is of the form $J = (f(x))$ for some $f(x) \in k[x]$. This $f(x)$ is not a constant (because then $J$ would be the whole of $k[x]$), and because $k$ is algebraically closed, it has a root, say $c \in k$. Then $f(x) = q(x) (x - c)$ for some $q(x) \in k[x]$. In particular $f(x) \in (x - c)$, so $J \subseteq (x - c)$. Since $J$ is maximal, $J = (x - c)$.
A: Observe that $\;(x-c)\;$ is maximal iff $\;k[x]/(x-c)\;$ is a field, but
$$k[x]/(x-c)\cong k\;,\;\;\text{since the evaluation homomorphism}\;\;\phi(f(x)):=f(c
)$$
is surjective and its kernel is $\;(x-c)\;$
A: The maximal ideals in $F[x]$, where $F$ is any field, are of the form
$$
I=(f(x))
$$
where $f\in F[x]$ is an irreducible monic polynomial.
What are the irreducible monic polynomials over an algebraically closed field?
A: Let $J$ be an ideal containing $(x-c)$, $P\in J$ not in $(x-c)$.Divide $P$ by $x-c$, $P=q(x)(x-c)+r$ this implies $r=P-q(x)(x-c)\in J$ $r=0$ since $J$ is not $k[X]$. Contradiction since $P$ is not in $(x-c)$.
On the other hand if $I$ is maximal, $p$ an element of minimal degree>1, write $p=(x-a)(x-b)q(x)$ since $k$ is algebraically closed, $(x-a)$ contains $p$ contradiction with the fact that $I$ is maximal.
So an element of minimal degree of $I$ is of the form $x-c$ if $p\in I$, write $p=q(x-c)+r, r\in k, r=p-q(x-c)\in I$. This implies that $r=0$ since $I$ is distinct of $k[x]$.
