It is a special case of a linear independence criteria for square roots. Said simply for this special case: $ $ if $\color{#0a0}{\sqrt c,\,\sqrt d}\,$ are irrational then the only way that their rational linear combination $\,\color{#c00}{e} = \color{#0a0}{a\sqrt c+ b \sqrt d}\,$ can be rational is when $\,\color{#c00}{e = 0},\,$ i.e. when the radicands are $\,\Bbb Q$-equivalent $\,\sqrt c = q\sqrt d\,$ for some $\,q\in \Bbb Q,\,$ so then $\,\color{#c00}e = (aq+b)\sqrt d\in \Bbb Q\!\iff\! \,aq+b=0\!\iff\! \color{#c00}e = 0,\,$ e.g. $\,2\sqrt {45}-3\sqrt{20} = 0\,$ by $\sqrt{45}/\sqrt{20} = 3/2,\,$ i.e. the sum can be rational only in the "trivial" case that the radicals can be rewritten to be rational multiples $\,b_i \sqrt d\,$ of the same radical $\,\sqrt d,\,$ so their sum is rational $\!\iff\! b_1+b_2=0.\,$ Below is a simple proof (high-school level).
$\bbox[1px,border:1px solid #c00]{\bbox[8px,border:1px solid #c00]{{\bf Theorem}\ \ \ \color{#0a0}{a\sqrt c+ b \sqrt d} = \color{#c00}e\in\Bbb Q\,\Rightarrow\, \color{#0a0}b\color{#c00}{e\!=\!0},\ {\rm if}\ \,\sqrt d\not\in\Bbb Q}}\ \ {\rm for}\,\ \color{0a0}{a,b,c,d}\in\Bbb Q$
Proof $\,\ (a\sqrt c = e-b\sqrt d)^2\Rightarrow a^2c = e^2\!+\!b^2d-2be\sqrt d,\,$ so $\,be\neq 0\Rightarrow\sqrt d\in\Bbb Q\Rightarrow\!\Leftarrow $
So,$ $ in OP: $\,\ \color{#0a0}{2\sqrt{3xy}+b\sqrt{3}}=\color{#c00}3\in\Bbb Q\,\Rightarrow\, \color{#0a0}b\:\!\color{#c00}3 = 0,\,$ so $\,0=\color{#0a0}b\, (= 2\!-\!x\!-\!y\,$ in OP), as sought.
Remark $ $ The theorem can be generalized to linear combinations of any number of square roots. Then it says roughly that if such a sum is rational then the square-roots must be multiplicatively dependent over $\Bbb Q$, i.e. some product of them is rational, see the proof in this answer (Besicovic's theorem). These results are greatly clarified when one exploits the innate symmetries by studying field / Galois theory, in particular that of radical (Kummer) extensions - see the papers cited there.