Find two integer numbers given the LCM and the difference between them I started a Computer Science degree this year and I have a subject called 'Discrete Mathematics' which this unit (divisibility) is annoying me a lot, because I can't find the key to solve the problems as like as other units and subjects. 
The problem that I can't solve is this:

Find two integer numbers 'a' and 'b' given that their difference is 1080 and their LCM is 3900

Thanks
 A: In the search of a more elegant solution rather than brute force, we know that as $\text{lcm}(a,b)=2^2\cdot 3\cdot 5^2\cdot 13$ that if both $a$ and $b$ had a factor of $13$ that $a-b$ must also be divisible by $13$.  Similarly if both $a$ and $b$ had a factor of $5^2$ that $a-b$ must be divisible by $5^2$.
Since $a-b=1080$ is not divisible by $13$ nor divisible by $25$, we know that exactly one of the two is divisible by $13$ and that exactly one of the two is divisible by $25$.
Also, since $a-b=1080=2^3\cdot 3^3\cdot 5$, one can also reason that both $a$ and $b$ must be divisible by $2^2\cdot 3\cdot 5=120$.
(They must both be divisible by four because otherwise one will be divisible by four and the other is not, implying their difference would not have been divisible by four which is a contradiction.  similarly for the other factors.  In general, try proving that $\gcd(a-b,\text{lcm}(a,b))$ divides both $a$ and $b$)
This brings our candidate answers to either $|a|=2^2\cdot 3\cdot 5^2\cdot 13=3900$ and $|b|=2^2\cdot 3\cdot 5=120$ or $|a|=2^2\cdot 3\cdot 5\cdot 13=780$ and $|b|=2^2\cdot 3\cdot 5^2=300$
It is clear that since $|3900\pm 120|>3780> 1080$ that it could not be the first result.
The second result on the other hand does work with $780-(-300)=1080$, yielding $a=780$ and $b=-300$.  We already know that $\text{lcm}(780,-300)=3900$ by construction.
A: $3900=2^2\cdot3^1\cdot5^2\cdot13^1$
$1080=2^3\cdot3^3\cdot5^1$

Since the difference of $1080$ is divisible by $2^2$, this component must be in both numbers.
Since the difference of $1080$ is divisible by $3^1$, this component must be in both numbers.
Since the difference of $1080$ is divisible by $5^1$, this component must be in both numbers.

Since the difference of $1080$ is not divisible by $5^2$, this component cannot be in both numbers.
Since the difference of $1080$ is not divisible by $13^1$, this component cannot be in both numbers.

This leaves us with only the following options:


*

*$a=2^2\cdot3^1\cdot5^1\cdot\color\red{5^1\cdot13^1}=3900$ and $b=2^2\cdot3^1\cdot5^1=60$

*$a=2^2\cdot3^1\cdot5^1\cdot\color\red{5^1}=300$ and $b=2^2\cdot3^1\cdot5^1\cdot\color\red{13^1}=780$



In the second option, we have $a+b=300+780=1080$.
So take exactly one of them as negative, and you have the answer.
A: HINT:
Let $(a,b)=d$ and $\dfrac aA=\dfrac bB=d\implies(A,B)=1$
$d(A-B)=1080$
and lcm$(a,b)=ABd=3900$
$\implies\dfrac{3900}{1080}=\dfrac{ABd}{d(A-B)}$
$\implies B=\dfrac{65A}{18A+65}$
Now if integer $D$ divides both $65A,18A+65;$
as $B$ is an integer, $D$ must divide $65(18A+65)-18(65A)=65^2$
and $18A+65$ must divide $65^2$
