Can one detect if two pairs of elements in Zp have the same exponential relation?
This is another way of expressing the decisional Diffie-Hellman problem.  This problem is more typically written as 'given $g,\  g^a, g^b, g^c$, does $g^{ab} = g^c$?'.

As for the difficulty of this problem, it is believed to be difficult as long as you stay within a large prime subgroup; in this case (because you specify a strong prime), you means that you want to make sure that both $x1$ and $x2$ are quadratic residues.

Here's what can go wrong if you don't; an attacker can determine which subgroup any particular element belongs to; if he (for example) determines that $x1$, $x2$ and $y1$ are quadratic nonresidues, and that $y2$ is a quadratic residue, he knows that $r1 \neq r2$.  Staying within a prime subgroup prevents this possible information leakage.