If $\gcd(a,m) = 1$, by Bezout's identity, there are integers $x$ and $y$ such that $ax + my = 1$. Notice that this says $ax \cong 1 \pmod{m}$, so $x$ is a multiplicative inverse of $a$ modulo $m$.
Using Bezout's identity in reverse looks like "given $a$ and $b$, if there are integers $u,v$ such that $au+bc = d$, then $\gcd(a,b)$ divides $d$." If that $d = 1$, then $\gcd(a,b) = 1$ and $a$ is relatively prime to $b$.
why $r_j$ is the least residue of $ar_i$ for some $i$ and $j$ in $[1,\phi(m)]$
(fixed that typo right at the end for you.)
Let $i \in [1,\phi(m)]$. Since $r_i$ is relatively prime to $m$, Bezout's identity gives an $x_i$ such that $x_i r_i \cong 1 \pmod{m}$. Then $(ax)(r_ix_i) \cong 1\cdot 1 \cong 1 \pmod{m}$.
We can rearrange $(ax)(r_ix_i)$ to obtain
$$ (ar_i)(xx_i) \cong 1 \pmod{m} \text{.} $$
But, using Bezout's identity in reverse, that means $\gcd(a r_i,m) = 1$, so $ar_i$ is relatively prime to $m$. Therefore $ar_i$ is congruent to one of $r_1, \dots, r_{\phi(m)}$ modulo $m$.