Let K be the set
$ K := \{p + \sqrt{2} . q : p, q \in \mathbb{Q}\} $
and let addition and multiplication be defined on $\mathbb{R}$
Prove if $p + \sqrt{2} \cdot q = 0$, then $p = q = 0$
Hint: use that $ \sqrt{2}$ is irrational
Logically, if $p + \sqrt{2} . q = 0$ this implies $ \sqrt{2} = \frac{-p}{q}$ which is not possible as $ \sqrt{2}$ is irrational. How do I write this as a proof though?
To me it basically looks like an OK proof (given that you're allowed to actually use that $\sqrt2$ is irrational). What you're using is that $-p$ is rational and dividing two rationals you get a rational number so $-p/q$ is rational.
Perhaps you should be more clear that $p$ and $q$ are rational numbers and especially require that $q\ne 0$ since that's required for $-p/q$ to be defined (on the other hand if $q=0$ the equation would reduce to $p=0$).
I assume that the set $K$ is part of the question and note that $K$ is never used. I think that the question is badly formulated partly for this reason, but also the fact that the requirement for $p$ and $q$ to be rational doesn't follow from an unused set definition (the $p$ and $q$ in the definition of $K$ are bound variables - which means they don't have scope outside the set comprehension).
If you're not allowed to use that $\sqrt2$ is irrational you fix that by just include that as a lemma along with the proof of that.