$\rm\: m A + n B = 1,\:$ so $\rm\:A\:$ and $\rm\:B\:$ are integers that are relatively prime. Why does this show that for any integer $\rm\,d\,$ dividing both $\rm\,A,B\,$ must also divide $1$?
Hint $\ $ $\rm\:d\mid A,B\:\Rightarrow\: A = ad,\ B\, =\, bd,\ $ so $\rm\ mA \!+ nB \,=\, (ma\!+\!nb)\,d \,=\, 1\:\Rightarrow\:d\mid 1$
Remark $\ $ Since you've tagged it "abstract algebra", a slight abstraction may prove instructive.
More conceptually: if $\rm\ A,B\:$ are multiples of $\rm\:d,\:$ then so too is $\rm\:m A \!+ n B\ \,(=\, 1),\:$ since multiples are closed under both addition and integer scalings $\rm\:x\to nx,\ n\in\Bbb Z,\:$ i.e. they form an ideal in $\,\Bbb Z.\:$ Generally, in any ring, the common multiples of some elements forms an ideal (historically one of the prototypical examples of an ideal). In a principal ideal domain (PID) such as $\rm\,\Bbb Z,\,$ the set of common multiples $\rm\,a,b,\ldots$ is the ideal $\rm\:lcm(a,b,\ldots)\,\Bbb Z.$
Since common multiple sets are ideals, your statement is a special case of the fact that an ideal $\rm\ I = (1)\ $ when it contains two comaximal elements: $\rm\ I\supset (a),(b)\!\iff\! I \supset (a)+(b)\,\ (= 1).\ $ For principal ideals, contains = divides, i.e. $\rm\ (c)\supseteq (a)\!\iff\! c\mid a.\:$ Thus, in a PID, the above specializes to $\rm\:c\mid a,b\!\iff\!c\mid gcd(a,b)\,\ (= 1),\:$ the universal property/definition of the gcd.