I want to show that $ \ A =\langle x,y \rangle$, the ideal generated by $x$ and $y$ is maximal in $R = \mathbb{Q}[x,y]$.
I have seen a different solution somewhere but it was kind of longer so I tried something else. I just want to know if it is correct.
Let $A \subseteq B \subseteq R$. We need to show that $B = A$ or $B=R$.
If $B=A$, then we are done.
Suppose, $B \neq A$. Then, there exists $p(x,y) \in B \setminus A$. As $p(x,y) \in A =\ <x,y>$, therefore the constant term of $p$ is not zero.
Thus $$p(x,y) = \sum_{i=0}^n a_i x^i, \hspace{0.5cm} a_0 \neq0, a_i \in \mathbb{Q}[y]$$
Now $\sum_{i=1}^n a_i x^i \in A \subseteq B$. This implies $p(x,y)-\sum_{i=1}^n a_i x^i \in B$. Therefore, $a_0 \in B$. As $a_0 \neq 0$, therefore $1 \in B$ which shows $B=R$.
This is almost correct but not quite. You cannot deduce that $1\in B$ from $a_0\in B$ since you only know that $a_0\in\mathbb{Q}[y]$, not that $a_0\in\mathbb{Q}$. What you can say is that $a_0$ has the same constant term as $p$ and hence has nonzero constant term, so you can write $a_0=\sum_{j=0}^m b_jy^j$ for $b_j\in \mathbb{Q}$, $b_0\neq 0$. Since $\sum_{j=1}^mb_jy^j\in B$, you get that $b_0\in B$, and now you can conclude that $1\in B$ since $b_0$ must be a unit.