Conceptually it follows immediately by $\:\!\overbrace{\small \text{uniqueness of reduced fractions}}^{\color{black}{\large \text{"unique fractionization"}}}$ $\, \color{#0af}{\small \rm (URF)},\,$ viz.
$\ \ \ \begin{align}&(a,b)\!=\!1\\ &(\color{#0a0}{c,d})\!=\!1\end{align},\ \ {\dfrac{a}b + \dfrac{c}{d}}\! = n \in \Bbb Z\,\Rightarrow$ $\,\dfrac{a}{\color{#c00}b} \!=\! \dfrac{dn\!-\!c}{\color{#c00}d}, \
\overbrace{\small \text{both in least terms}}^{\small\textstyle{p\mid \color{#0a0}d,dn\!-\!c\Rightarrow p\mid\color{#0a0} c}}
\,\overset{\color{#0af}{\rm URF}}\Longrightarrow\, \color{#c00}{b = d}$
Remark $ $ A typical application of this basic result is:
Theorem $\ $ If $\,q,r\in\Bbb Q\,$ then $\, q+r,\, qrs\in\Bbb Z\,\Rightarrow q,r\in\Bbb Z,\,$ if $\,\color{#c00}{{\rm squarefree}\ s\in \Bbb Z}\,$ (e.g. $\, s\!=\!1)$
Proof $\, $ By $\,q+r\in\Bbb Z\,$ they have equal least denominator $\,d\,$ so $\,qrs\in \Bbb Z\Rightarrow \color{#c00}{d^2\mid s\Rightarrow d\!=\!1}\,$
Further exploiting innate $\rm\color{#0a0}{symmetry}$, the prior generalizes as below (for any number of $\,a_i)$
Theorem' $ $ If squarefree $\,q\in\Bbb Z,\,$ $\,a_i\in \Bbb Q,\, $ $\, e_i\,$ are elementary $\rm\color{#0a0}{symmetric}$ polynomials in $\,a_i,\,$ e.g. $\,(x\!-\!a_1)(x\!-\!a_2)(x\!-\!a_3) = x^3\!-e_1\:\! x^2 + e_2\:\! x - e_3,\,$ then all $\,\color{#0a0}{q^i e_{i+1}\in\Bbb Z}\,\Rightarrow\,$ all $\,a_i\in\Bbb Z.\,$
More generally see How much can a sum of fractions reduce?