Let $R$ be a commutative ring and let $S \subset R$ is closed under multiplication. Let $a$ to be an ideal in $R$ such that $a \cap S = \emptyset$. We further assume that if $b$ is an ideal in $R$ such that $a \subset b$ and $a \ne b$, then $b\cap S \ne \emptyset$. Prove that a is a prime ideal in R.
So I am seriously lost on this question, I've been picking different elements to see if I could get some sort of direction but I simply don't know how to approach this problem. Any hints would be greatly help me.
This is actually a pretty tricky question, so don't worry too much that you haven't gotten it yet.
Basically your hypothesis is as follows: $a$ is an ideal which is maximal with respect to the property that $a\cap S=\varnothing$. Usually these maximality properties yield a prime ideal.
For example, I'll show you how to prove the following similar (but easier) statement:
(The "best" proof is to take the quotient and show it's a field, but let's try the following naive proof just to illustrate the point.)
Suppose $m$ is a maximal ideal in a commutative ring $R$. We want to show that if $ab\in m$ then either $a\in m$ or $b\in m$. If neither $a$ nor $b$ lay in $m$, then look at the ideals $I=m+(a)$ and $J=m+(b)$ --- notice these each properly contain $m$. So by maximality of $m$, it must be that $I,J$ are not proper ideals of $R$, so $I=J=R$.
Now $m+(a)=R$ means that $x+ra=1$ for some $x\in m$ and $r\in R$. Similarly, $y+sb=1$ for some $y\in m$ and $s\in R$. This gives: $$1 = (x+ra)(y+sb) = xy + x(sb) + y(ra) + (rs)ab$$ which lays in $m$ because each term does --- it's important to note that here is where we use the assumption that $ab$ lays in $m$! This shows $1\in m$, so $m=R$ which contradicts the assumption that maximal ideals are proper ideals.
Often in commutative algebra, if you have a proper ideal $p$ which is maximal with respect to some useful property, then $p$ is actually prime ideal. And the proof usually goes along the lines I wrote above: suppose $ab\in p$ but $a\notin p$ and $b\notin p$, then consider the ideals $p+(a)$ and $p+(b)$ and use maximality here.
Good luck!