Prove that $\sqrt{5n+2}$ is irrational

Well, one way to say it is irrational is to see that $5n+2$ isn't an integer square for any $n\in\mathbb{Z}$ (it only finish in $2$ or $7$). The other way you're trying lets you the same ending $(p,q\in \mathbb{Z}, q\neq 0)$: \begin{align*} \sqrt{5n+2}=\frac{p}{q}&& \\ 5n+2=\frac{p^2}{q^2} &&(1)\\ q^2(5n+2)=p^2 && (2) \end{align*}

Let $$p=p_1^{\alpha_1}p_2^{\alpha_2}\dots p_t^{\alpha_t}$$ $$q=q_1^{\beta_1}q_2^{\beta_2}\dots q_s^{\beta_s}$$

where $p_i,q_j$ are primes and $\alpha_i,\beta_j$ are positive integers.

From $(1)$, $p^2/q^2$ is an integer (is equal to $5n+2$), so you have that the $q_i$ are certain primes $p_j$. Renaming the prime factors in a way such that $q_i=p_i$, you can let you the fraction (considering that $t>s$)

$$\frac{p^2}{q^2}=\frac{p_1^{2\alpha_1}p_2^{2\alpha_2}\dots p_t^{2\alpha_t}}{q_1^{2\beta_1}q_2^{2\beta_2}\dots q_s^{2\beta_s}}=p_1^{2(\alpha_1-\beta_1)}p_2^{2(\alpha_2-\beta_2)}\dots p_t^{2(\alpha_s-\beta_s)}\dots p_t^{2\alpha_t}=5n+2$$

then this implies that $5n+2$ is a square, but by the original statement, it can't be.


For the second question: $\frac{5n+7}{3n+4}$ is irreducible.

For that is enough to see that if there is a prime $p$ such that

$p|5n+7$ and $p|3n+4$

then

$p|[3(5n+7)-5(3n+4)] \Rightarrow p|1$ what is impossible.


Hint $\ {\rm mod}\,\ 5\!:\,\ k^2 \in \{0,\pm1,\pm2\}^2\equiv \{0, \pm 1\},\,$ none $\equiv 2,\ $ i.e. squares $\not\equiv 2\pmod5$

But by the Rational Root Test, $ $ if $\,x^2\!-15\,$ has a rational root, it is an integer, contra above.

You can't directly use the linked proof because it uses $\,15\mid k^2\,\Rightarrow\, 15\mid k,\,$ which works because $\,15\,$ is squarefree. But $\,5n+2\,$ needn't be squarefree, e.g. it's $\,12\,$ for $\,n=2,\,$ and $\,12\mid 6^2\,$ but $\,12\nmid 6.\,$ But we can always reduce to squarefree radicands: write $\,5n+2 = kj^2.\,$ Then $\sqrt {5n+2} = j\sqrt k\,$ so $\,\sqrt{5n+1}\,$ is rational iff $\sqrt k\,$ is rational. By above $\,5n+2\,$ is not a square so it has squarefree part $\,k>1,\,$ so the linked classical method proves $\sqrt k$ irrational $\,\Rightarrow\sqrt{5n+1} = j\sqrt k\,$ irrational.


For the second, note that if $\ d\mid 5n\!+\!7,\, 3n\!+\!4\ $ then

$${\rm mod}\ d\!:\,\ \dfrac{7}5 \equiv -n \equiv \dfrac{4}3 \,\Rightarrow\, 0\equiv 7\cdot 3 - 5\cdot 4\equiv 1\,\Rightarrow\, d\mid 1$$


Another way is to use Cramer's rule (or elimination) to solve for $\,n\,$ and $\,1\,$ below

$$ \begin{eqnarray} \ 3\,n\, +\, 4\cdot 1 &=& i\\ \\ 5\ n\, +\, \ 7\cdot 1 &\ =\ & j\end{eqnarray} \quad\Rightarrow\quad \begin{array}\ n \ = \ \ \ \, 7 \,i\, -\, 4\ j \\\\ \color{#c00}{\bf 1}\ =\, {-5}\ \color{#0a0}i\, +\, 3 \ \color{#0a0}j \end{array} $$

Therefore, by the lower equation in the RHS system: $\ n\mid \color{#c00}{\bf 1}\,\ $ if $\,\ n\mid \color{#0a0}{i,\,j}$


Remark $\ $ In the same way we can prove more generally

Theorem $\ $ If $\rm\,(x,y)\overset{A}\mapsto (X,Y)\,$ is linear then $\: \rm\gcd(x,y)\mid \gcd(X,Y)\mid \color{#c00}\Delta \gcd(x,y),\ \ \ \color{#c00}{\Delta := {\rm det}\, A}$

e.g. $ $ in OP we have $\,\color{#c00}{\Delta =\bf 1}\,$ so the above yields $\ \gcd(3n+4,5n+7)\mid\color{#c00}{\bf 1}\cdot\gcd(n,1) = 1$