Could anyone explain to me why maximal ideals are prime?

I'm approaching it like this, let $R$ be a commutative ring with $1$ and let $A$ be a maximal ideal. Let $a,b\in R:ab\in A$.

I'm trying to construct an ideal $B$ such that $A\subset B \neq A$ As this would be a contradiction. An alternative idea I had was to prove that $R/A$ is an integral domain, but this reduces to the same problem.

EDIT: Ergh.. just realized that I've learnt a theorem that states is $A$ is a maximal ideal then $R/A$ is a field

Here’s a proof that doesn’t involve the quotient $R/A$.

Suppose that $A$ is not prime; then there are $a,b\in R\setminus A$ such that $ab\in A$. Let $B$ be the ideal generated by $A \cup \{a\}$; $B = \{x+ar: x\in A\text{ and }r\in R\}$. Clearly $A \subsetneq B$, so $B = R$, $1_R \in B$, and hence $1_R = x + ar$ for some $x\in A$ and $r\in R$. Then $$b = b1_R = b(x+ar) = bx + bar.$$ But $bx \in bA \subseteq RA = A$, and $bar \in Ar \subseteq AR = A$, so $b \in A$. This contradiction shows that $A$ is prime.
