Let $R$ be a finite commutative ring with unity. Then, if $I$ is prime ideal, then it is also maximal ideal.
I know its solution, but I want discuss the following try:
Notation:
$1$)$U(R)$ is the set of units of $R$.
$2$)$ZD(R)$ is the set of zero divisors of $R$.
Let $R$ be a finite commutative ring with unity, then $R=U(R)\cup ZD(R)$.
$I \neq R$ since $I$ is prime ideal.
Now,assume $I \subseteq J \subseteq R$ (J is ideal of $R$):
$1$)If $U(R) \cap J \neq \emptyset $, then $J=R$ ,so $I$ is maximal ideal.
$2$)If $U(R) \cap J=\emptyset$, then $J \subseteq ZD(R) \subset R$, so here we need to prove $J=I$.
Let $x \in J$, then $\exists y \in R$ such that $xy=0_{R} \in I$.
Since $I$ is prime ideal ,we have $x \in I$ or $y \in I$.
$x \in I$ leads to $I=J$.
But how can I prove $I=J$ from $y \in I$.
It'd be better to write $R=U(R)\cup ZD(R)$ as neither of the things being added are necessarily closed under addition.
You can't prove it from these facts alone
because there are counterexamples. For example, for a field $k$, let $$R=k[x,y]/(xy,x^2) \\ I=(X) \\ J=(X,Y)$$ where $X$, $Y$ denote the respective images of $x$ and $y$ in the quotient $R$. $I$ and $J$ are both prime, and $XJ=\{0\}$.
You have to actually use something more (in your case, you are given that $R$ is finite.)
You mean $y\in I$, right?