Find $r$ from $x_1\equiv r^a \pmod{p}, x_2\equiv r^b \pmod{p}$ and gcd$(b, p-1)=1$ $r$ is a primitive root for the prime $p$
$x_1\equiv r^a \pmod{p}$
$x_2\equiv r^b \pmod{p}$
If $gcd(b, p-1)=1$, how can I determine $r$ if $p$, $x_2$, and $b$ are known?

HINT: If gcd$(b,p-1)=1$, then we can write $1 = tb + s(p-1)$. So $tb\equiv 1 \pmod{p-1}$. 
