Let's unpack "$\forall x,y\in\mathbb{Z}, p\mid xy\implies p\mid x\lor p\mid y$" a little.
This says,
- First write down all possible pairs $(x,y)$ where $x$ and $y$ are both in $\mathbb{Z}$.
- Now throw most of them away, keeping only the ones where $p \mid xy$.
- Of the surviving pairs, are any a witness to the falsehood of "$p\mid xy\implies p\mid x\lor p\mid y$"? To be such a witness, we must have a pair $(x,y)$ that makes "$p\mid xy$" true (which we've arranged by throwing out the pairs that do not do so) while also making "$p\mid x\lor p\mid y$" false.
You are to show that the absence of witnesses to falsehood forces that $p$ is prime. Equivalently, by contraposition, you are to show that $p$ not a prime forces the existence of a witness of falsehood.
Working through a simple example can suggest an outline of the proof. As an example of showing the contrapositive version, the choice $p=6$ is not prime. Now take $x = 2$, $y=3$. We see that $p = 6 \mid 6 = 2 \cdot 3 = x y$. However, $p = 6 \not\mid 2 = x$ and $p \not\mid 3 = y$. Consequently, the pair $(2,3)$ is a witness to the falsehood of the implication when $p = 6$. So for this particular choice of not prime $p$, we have shown that there is a witness to falsehood of the implication. How would you modify this argument to work for an arbitrary not prime $p$?