$18a$ and $25a$ both integers, then so is $a$ Let $a\in \mathbb{Q}$ such that $18a$ and $25a$ are integers, then we wish to prove that $a$ must be an integer itself. What that means is that $a=\frac{p}{1}$ where $p \in \mathbb{Z}$. What we do know is that we can express the $\gcd(18,25)$ as: 
$$ \gcd(18,25)=18x +25y$$ Now if $x=y=a$, we are done, since:
$$ \gcd(18,25)=18a +25a=43a$$ as the $\gcd$ is always an integer and so is 43, so $a$ is also an integer.
But, how would I generalise this?

Conceptually $\, \dfrac{m}{18} = a = \dfrac{n}{25}\,$ so it's least denominator divides coprimes $18,25$ so is $1,\,$ so $\,a\in\Bbb Z$
Remark $\ $ This is an additive analog of this (multiplicative) group result 
$$ a^{\large 18} = 1 = a^{\large 25}\,\Rightarrow\, {\rm ord}(a)\mid 18,25\,\Rightarrow\, {\rm ord}(a)=1\,\Rightarrow\, a = 1$$
For further discussion see  denominator ideals and order ideals and unique fractionization.
