Problem
Let $n$ be a positive integer and not a perfect square. Prove that $\sqrt{n}$ is irrational.
Proof
Consider proving by contradiction. If $\sqrt{n}$ is rational, then there exist two coprime integers $p,q$ such that $$\sqrt{n}=\frac{p}{q},$$ which implies $$p^2=nq^2.$$ Moreover, since $p, q$ are coprime, by Bézout's theorem, there exist two integers $a,b$ such that $$ap+bq=1.$$ Thus $$p=ap^2+bpq=anq^2+bpq=(anq+bp)q,$$ which implies $$\sqrt{n}=\frac{p}{q}=anq+bp \in \mathbb{N^+},$$ which contradicts.
It is fine.
I would perhaps just note that the equality $p=(anq+bp)q$ goes against the hypothesis that $p$ and $q$ are coprime, unless $q=1$, in which case $\sqrt n=p\in\mathbb Z$. But that is just a matter of taste.