Given that 287 = 91 · 3 + 14, we know that any divisor of 91 and 287 must be a divisor of 14 I'm reading a book on Discrete Mathematics and there's something I don't understand. It says the following:

Given that 287 = 91 · 3 + 14, then:

*

*Any divisor of 91 and 287 must be a divisor of 14

*Any divisor of 91 and 14 must be a divisor of 287


Why is this true?
Thank you.
 A: The first because $$\frac{287}{d}-\frac{91}{d}\cdot3=\frac{287}{d}-\frac{91\cdot3}{d}=\frac{287-91\cdot3}{d}=\frac{14}{d}\in\mathbb Z$$ for all this divisor $d$.
The second is the same.
A: $d,r,s,k,l  \in \mathbb{Z}$.
1)Let $d|91$ and $d|287$ then: 
$287=rd;$ $91 = sd.$
$14 = 287 - 3×91 = rd -3sd =$ 
$d( r-3s)$, I.e. $d|14.$
2) Let $d|91$ and $d|14$, then 
$91= kd$ ; $ 14= ld$.
$287 =3× 91 +14 = 3kd +ld =$
$ d(3k+l)$, I.e. $d|287.$
A: Theorem: If $a|b$ and $a|c$, then $a|(br+cs)$ for every $r$ and $s$ in $\mathbb{Z}$.
Proof: We know that $b=ak$ and $c=al$ for some $k$ and $l$ in $\mathbb{Z}$. Then:
$$br+cs=akr+als=a\underbrace{(kr+ls)}_{\mathbb{Z}}$$
Therefore, $a|(br+cs)$.
$$\tag*{$\blacksquare$}$$

You can apply the above theorem here. We have $a|91$ and $a|287$ (Letting $b=91$ and $c=287$) and note that $287-91\cdot 3=14$, hence let $r=-3$ and $s=1$ which are both integers, hence you know that $a|14$.
The same theorem can be used to show the second statement is true.
A: I believe it's better if you make the problem more general.

Suppose $a=bq+c$, where $a$, $b$, $c$ and $q$ are integers.

*

*If the integer $d$ is a divisor of $a$ and $b$, then $d$ is a divisor of $c$.

*If the integer $d$ is a divisor of $b$ and $c$, then $d$ is a divisor of $a$.


Your case is $a=287$, $b=91$, $c=14$ and $x=3$.
Proof of 1. Suppose $a=dr$ and $b=ds$. Then $c=a-bq=adr-bdsq=d(ar-bsq)$, hence $d$ is a divisor of $c$.
Proof of 2. Similar (supply it).
